Exception handling within the module, not the shell?

Topics: Prism v2 - WPF 4
Aug 9, 2010 at 7:29 PM

I am looking for a solution for exception handling within the module, instead of bubbling up to the shell. Particularly when an error happens on a UI event, is there a way to terminate the module only, not the entire app?

Aug 9, 2010 at 11:23 PM


I’m not sure if you could perform something like that, since there is no higher execution entry point in each module where you could handle all their exceptions.

On the other hand, if you try to achieve this scenario to know where the exception occurs and based on this perform a particular action, you could be able to know the name of the assembly by reading the property Exception.Source. To make this option valid, you must initialize only one module per assembly.

Additionally, please take into account that once modules are loaded there is not way to unload them.

Please let me know if this helps.

Fernando Antivero