Topic Path: Symbol Reference > Classes > TIdThread Class > TIdThread Events > OnException Event
ContentsIndexHome
PreviousUpNext
TIdThread.OnException Event

Handles exceptions raised in the thread of execution.

property OnException: TIdExceptionThreadEvent;

OnException is a TIdExceptionThreadEvent event handler that allows the application to specify how execeptions are handled in the multi-threaded program. 

Write an OnException event handler procedure to provide special processing when the thread encounters an Exception in the Execute method. 

The text portion of the Exception message encountered during execution of the thread can be found in TerminatingException

Do not free the thread object within this event handler. Allow the OnException event handler to return to the thread context for proper thread termination.

Copyright 1993-2006, Chad Z. Hower (aka Kudzu) and the Indy Pit Crew. All rights reserved.
Post feedback to the Indy Docs Newsgroup.