Is it possible to catch unexpected errors globally in c# WPF application – c# 4.0
I found that DispatcherUnhandledException was able to catch UI thread errors but actually i need TPL threads. UnhandledException was able to catch thread errors but it was still causing software to terminate.
So any solution to catch unhandled exceptions in the threads not in UI thread and still let software to run not terminate. Threads are TPL threads. (Task Parallel Library)
A part from handling
DispatcherUnhandledExceptionwhich you already have done add this to your config fileThis prevents your secondary threads exception from shutting down the application.