thread HandleExceptions property
Return to Introduction  Previous page  Next page
Applies to
auThread component.  

Declaration
property HandleExceptions: Boolean; // True by default  

Description
The HandleException property determines whether the thread should automatically handle all exceptions which occurs on it's execution, without raising exception, or you would like to handle exceptions "manually" in OnExecute event handler.  
 
Set HandleException to True if you don't want to allow to raise an exceptions and/or handle exceptions in OnException event. Set HandleException to False if you wish to handle exceptions within OnExecute event handler (see excample below).  

Example
{ "manual" handling of exceptions within OnExecute event handler (when HandleException = False) }  
procedure TForm1.QueryThreadExecute(Sender: TObject);  
begin  
  with Query1 do  
   try  
     ExecSQL;  
   except  
     // handle exception "manually"  
   end;  
end;  

See also
OnException and OnExecute events.