Script exceptions not caught

Issue #261 resolved
Walter Weyers created an issue

Running the Simple demo (on D10.4) and adding a simple exception in the script like so:

for i:=1 to 10 do
 begin
   PrintLn(IntToStr(i));
   If i>6 then raise Exception.create('boom');
 end;

this Delphi code is never reached:

  except
     on E: Exception do begin
        MEResult.Lines.Text:=E.ClassName+': '+E.Message;
     end;
  end;

Instead, the script just gracefully stops a the 7th step, after having printed

1
2
3
4
5
6
7

So, how can a script exception be caught?

Comments (2)

  1. Log in to comment