www.kxcad.net Home > Electronic Index > Altium(Protel) Index
Declaration
try statements except statements end;
Description
Use Try-Except blocks to handle exceptional cases for example to catch specific exceptions and do something useful with them, such as log them in an error log or create a friendly dialog box. Since the On keyword is not supported in DelphiScript, thus use the the Raise statement inside the Except block and only report a textual message.
Example
Try
X := Y/Z;
Except
Raise(‘A divide by zero error!’);
End;
See also