try...end try

Examples


The try...end try statement is used to implement structured exception handling in Dexterity.

Syntax

try statements {catch [class] statements} {else statements } end try

Parameters

statements – The sanScript statements to be executed.

catch [class] – A long integer specifying the class of the exception to catch. A try...end try statement can contain several catch clauses. If a catch clause will catch several classes of exceptions, separate them with commas.

else – If the else clause is included, then the statements following it will be run if none of the catch clauses catch the exception that was thrown.

Comments

The try...end try statement must contain at least one catch clause or an else clause.

If none of the catch clauses catch the exception and there is no else clause, the exception is considered unhandled. A dialog box is automatically displayed describing the situation to the user.


Documentation Feedback