TaskScheduler.UnobservedTaskException Event

May 11, 2014

Occurs when a faulted Task's unobserved exception is about to trigger exception escalation policy, which, by default, would terminate the process.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

public static event EventHandler<UnobservedTaskExceptionEventArgs> UnobservedTaskException

This AppDomain-wide event provides a mechanism to prevent exception escalation policy (which, by default, terminates the process) from triggering.

Each handler is passed a UnobservedTaskExceptionEventArgs instance, which may be used to examine the exception and to mark it as observed.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2014 Microsoft