Search code examples
exceptioncompact-frameworkerror-handlingglobalunhandled-exception

Can a .NET 3.5 Compact Framework have a global error handler?


Is there any way to write an error handler for all otherwise unhandled exceptions in a .NET CF 3.5 app? I don't see any kind of OnError event (or any events) on the compact Application class.

Searching on google only seems to bring up references to global error handling in ASP.NET, which does not help me, as this is a fat-client handheld app.


Solution

  • Handle the AppDomain.Current.UnhandledException event.