I am using Prism 4.1 and MVVM pattern in my app. What i want is to create a global class in my shell app to catch each module's exception when that occurs. Any exception in each module is not handled in each module thru "try...catch.." statement.
I am currently using DispatcherUnhandledException in my app.xaml.cs file, code snippet looks like this:
public partial class App : Application
protected override void OnStartup(StartupEventArgs e)
private void App_DispatcherUnhandledException(object sender,
Howerver, it seems to me that the App_DispatcherUnhandledException method can't catch all exception that happens in each module. yes, it did catch some of exceptions, but not all. for example, when an exception happens in the viewmodel of one module, the App_DispatcherUnhandledException
is not hit in the shell app.
Could anyone thred some lights on this and help me out?
Any input will be much appreciated.