This documentation is archived and is not being maintained.

_AppDomain.UnhandledException Event

Occurs when an exception is not caught by an event handler.

[Visual Basic]
Event UnhandledException As UnhandledExceptionEventHandler
event UnhandledExceptionEventHandler UnhandledException;
__event UnhandledExceptionEventHandler* UnhandledException;

[JScript] In JScript, you can handle the events defined by a class, but you cannot define your own.

Event Data

The event handler receives an argument of type UnhandledExceptionEventArgs containing data related to this event. The following UnhandledExceptionEventArgs properties provide information specific to this event.

Property Description
ExceptionObject Gets the unhandled exception object.
IsTerminating Indicates whether the common language runtime is terminating.


The UnhandledExceptionEventHandler delegate for this event provides default handling for uncaught exceptions. When this event is not handled, the system default handler reports the exception to the user and terminates the application.

This event occurs only for the application domain that is created by the system when an application is started. If an application creates additional application domains, specifying a delegate for this event in those applications domains has no effect.

For more information about handling events, see Consuming Events.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

_AppDomain Interface | _AppDomain Members | System Namespace