try except

edited 1:53PM in FastScript
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.

Comments

  • edited 1:53PM
    "on E: Exception" is not supported.
  • Hi;

    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;
  • edited 1:53PM
    No, there is no such variable, you can't show error message in the script.
  • edited 1:53PM
    You can create a user function and control the Try..Except throug Delphi...

    regards.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.