KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I started a new WPF project in VS2008 and then added some code to trap DispatcherUnhandledException . Then I added a throw exception to Window1 but the error is not trapped by the handler. Why? public App() { this.DispatcherUnhandledException += new DispatcherUnhandledExceptionEventHandler(App_DispatcherUnhandledException); } void App_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e) { System.Windows.MessageBox.Show(string.Format("An error occured: {0}", e.Exception.Message), "Error"); e.Handled = true; } void Window1_MouseDown(object sender, MouseButtonEventArgs e) { throw new NotImplementedException(); }
Tags (comma-separated)
Save Edits
Cancel