Internet Direct (Indy) Version 9.0.1 Beta
TIdThread.OnException
Handles exceptions raised in the thread of execution.

property OnException: TIdExceptionEvent;
Description
OnException is a TIdExceptionEvent 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.

Note: 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.

The text portion of the Exception message can also be found in TerminatingException.