ModuleLoaderService behaviour

Topics: CAB & Smart Client Software Factory
Mar 21, 2006 at 10:19 AM
originally posted by: limepickle

When the ModuleLoaderService loads a set of modules, it will stop if loading any module throws an exception.

Why take this approach rather than giving subsequent modules in the set a chance to load?

Mar 21, 2006 at 12:18 PM
originally posted by: matiaswoloski

Yes it will throw a ModuleLoadException if something failed either when adding the services or when the ModuleInit is executed.

You can create your own IModuleLoaderService. It would be a copy of the existing one but it will catch the excepctions and then it might raise an event saying that the module was not loaded (check NotifyOfLoadedModule on ModuleLoaderService)

Mar 22, 2006 at 7:19 AM
originally posted by: BradWilsonMSFT

We considered exceptions during module loading to be non-recoverable failures. Modules may have dependencies on other modules. We cannot presume that the system would continue to work properly in the face of an exception during module loading.