EXCEPTION ... END EXCEPTION

System Testing Test Script Language.

Syntax

EXCEPTION [ <proc>( [ <arg> { [, <arg>]} ] ]

END EXCEPTION

Description

The EXCEPTION instruction or block deletes a specific environment by executing the set of instructions or the procedure <proc>. END EXCEPTION marks the end of the EXCEPTION block.

Associated Rules

An EXCEPTION block or instruction applies to the set of scenarios at its level.

It does not apply to subscenarios of these scenarios.

The EXCEPTION instruction or block is optional.

A maximum of one EXCEPTION block may occur in a scenario.

The EXCEPTION instruction is only executed if a scenario terminates with an error.

It does not matter where the EXCEPTION instruction is placed among scenarios in a given level.

Example

#int sock;

EXCEPTION

CALL close (sock)

...

END EXCEPTION

...

SCENARIO Main

...

END SCENARIO

Related Topics

INITIALIZATION | TERMINATION