How to catch an exception

Hello



How can I catch an exception?



Scripter cannot compile this :



Try

I:= 5 / 0;

Except

On e: exception do

Begin

   Showmessage(e. Exception) ;

End;

End;



Scripter stops with an error on the e: exception line.

Hi,

Exception information is provided in LastExceptionClassName and LastExceptionMessage functions. Both are string values, you can then check for the exception that way.
Such "on e: exception do" syntax is not supported in TMS Scripter.