![]() |
![]() ![]() ![]() |
auThread component.
|
property HandleExceptions: Boolean; // True by default
|
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).
|
{ "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;
|
OnException and OnExecute events.
|