Exception handling

How can you ensure that no exceptions escape the entry point of an WPF application. In .NET 2.0 this was simple since you could enclose all of your code in the main method with and try/catch blocks. However, in WPF we now have the App.xaml and App.xaml.cs files. I need to ensure that if something bad does happen where an exception is accidentally not caught for whatever reason, we can at least crash gracefully.

I'm guessing that I will need to form my entry point completely in code, but am not sure of the proper way to accomplish this in WPF. Thanks.




Answer this question

Exception handling