Application.SetUnhandledExceptionMode Method (UnhandledExceptionMode)
Assembly: System.Windows.Forms (in system.windows.forms.dll)
An UnhandledExceptionMode value describing how the application should behave if an exception is thrown without being caught.
You cannot set the exception mode after the application has created its first window.
It is often not feasible to catch all of the exceptions thrown by an application. Using this method, you can instruct your application whether it should catch all unhandled exceptions and continue operating, or whether it should expose them to the user and halt execution.
Call SetUnhandledExceptionMode before you instantiate the main form of your application using the Run method.
Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.