System.Windows.Forms.UnhandledExceptionMode Enumeration

Defines where a Windows Forms application should send unhandled exceptions.

Syntax

public enum UnhandledExceptionMode

Remarks

This enumeration is used by Application.SetUnhandledExceptionMode(UnhandledExceptionMode).

Note:

In the .NET Framework version 2.0, the common language runtime behavior changed to allow unhandled exceptions to propagate up the call stack. This behavior can be disabled via the application configuration file. For more information, see Exceptions in Managed Threads.

Members

Member NameDescription
Automatic

Route all exceptions to the Application.ThreadException handler, unless the application's configuration file specifies otherwise.

CatchException

Always route exceptions to the Application.ThreadException handler. Ignore the application configuration file.

ThrowException

Never route exceptions to the Application.ThreadException handler. Ignore the application configuration file.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0