NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Application ThreadException Event

Occurs when an untrapped thread exception is thrown.

The following declaration shows the syntax for a method that handles the ThreadException event.

[Visual Basic]
Private Sub ApplicationName_ThreadException( _
   ByVal sender As Object, _
   ByVal e As ThreadExceptionEventArgs _
)
[C#]
private void ApplicationName_ThreadException(
   object sender,
   ThreadExceptionEventArgs e
);
[C++]
private: void ApplicationName_ThreadException(
   Object* sender,
   ThreadExceptionEventArgs* e
);
[JScript]
private ApplicationName_ThreadException(
   sender : Object,
   e : ThreadExceptionEventArgs
);

Parameters

sender
The source of the event.
e
A ThreadExceptionEventArgs that contains the event data.

Remarks

This event allows an application to intelligently handle an exception. It is called by a window procedure when it receives a thread exception. You should attach your event-handling methods to the System.WinForms.Application.ThreadException event to deal with the exception. An appropriate event-handling method will not terminate the thread, and allow your application to continue executing.

See Also

Application Class | Application MembersTopic | System.WinForms Namespace