try except
How do you use Try/Exception and capture exceptions?
Seems "On E:Exception " is not right.
Thanks,
Brian
P.S. I'd like to see 'STDOUT' implemented to a something like a TStringList ,
similar to ErrorMsg but could capture output from a "Method call"
and output at the end of the script.
Seems "On E:Exception " is not right.
Thanks,
Brian
P.S. I'd like to see 'STDOUT' implemented to a something like a TStringList ,
similar to ErrorMsg but could capture output from a "Method call"
and output at the end of the script.
Comments
i know that "on E: Exception" is not supported, but is there any way to 'capture' the exception message?
something like that:
procedure GenerateError;
begin
try
ShowMessage(StrToInt('A'));
except
ShowMessage(ErrorMessage); // it exist an variable or function ErrorMessage ?
end;
end;
regards.