0
votes

When a thread throws an exception that is unhandled, it terminates. What is the proper way to handle exceptions thrown on threads and how to propogate relevant exception data to other parts of the code that would need to subscribe to notifications? Is there an INotifyThreadPoorlyDesigned interface that I missed somewhere?

Same applies for how to handle stuff dispatched to the WPF UI.

1

1 Answers

1
votes

To handle work that throws an exception on a dispatcher thread, simply hook the Application::DispatcherUnhandledException event. To handle non-dispathcer thread exceptions, you just need to hook the standard AppDomain::UnhandledException event.