Hadling Exceptions

May 18, 2013 at 4:07 AM
Is there a centralized place to handle all exceptions that comes up in ViewModel or Model to be logged?
Editor
May 21, 2013 at 8:15 PM
Edited May 21, 2013 at 8:16 PM
Hi,

If you want to react to UnhandledExceptions in your application that were not catched, I believe you could subscribe to the UnhandledException event in the Application class:
public App()
{
    this.UnhandledException += App_UnhandledException;
}

private void App_UnhandledException(object sender, UnhandledExceptionEventArgs e)
{
    ... logic to log the exception ...
}
Thanks,

Damian Cherubini
http://blogs.southworks.net/dcherubini
May 22, 2013 at 5:54 AM
Thanks Damian for your reply Actually I am looking for any kind of error that is raised in VM or Model can be bubbled up and handled at a centralized location.