TMSCRIPT Raise

Dear Sir

I am using TMSCRIPT and it was working find ...last few days when i am using
raise('Error Message') I am getting below message

image

Moving this message to BIZ/Scripter category, as this is not part of VCL UI Pack, even less a feature request.

We have received the same support request via private e-mail. However, in the private e-mail the error message in the screenshot is different. I don't know where the "NO" is coming from, but I believe you probably have temporarily changed the code to raise('NO').

If my guess is right, everything is working fine, you are asking Scripter to raise an exception and it's doing so.

If not, please provide more details to reproduce the issue.

Hi Wagner

Please download file from below link. i have made small vedio explaing

https://wetransfer.com/downloads/df503490409c4f6056a6d524fe2aa19520230712025948/017faba9ce6e35b15f8fbec0e9f305a920230712030012/b9c309

Thanks
Syed

Thanks for the video. But yes, all of that is expected. Calling to raise generates an exception, and any exception raised during scripter execution shows such message with more detailed information about where the exception occurred.

You can manually handle the runtime errors yourself using OnRuntimeError event:

  FScripter.OnRuntimeError := RuntimeErrorEvent;
..

procedure TForm1.RuntimeErrorEvent(Sender: TObject; var msg: string; row, col: integer; var ShowException: boolean);
begin
  // handle msg as you wish
  Delete(msg, Pos(' when evaluating', msg), MaxInt);

  ShowException := False;
  raise Exception.Create(msg);
end;

Dear Wagner
Thanks a Alot.
I am planning to convert my application into Web and thinking to use TMS Webcore.
I read some where you mentioned TMSScript is not multithread ..
Do TMS has any plan to comeup Multithread Support for TMSScript
Thanks
Syed

Check the multithread demo in demos folder. It shows how to use scripter with multiple threads.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.