fpt and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Ref Manual Home |

EXCEPTION

Syntax:

!% EXCEPTION

Function:

The command EXCEPTION is written in the code to indicate a sequence of statements which exist only to handle exceptions, i.e. error conditions. The command is written within a comment in, or immediately before, the first statement which handles the exception. The command is introduced by a comment delimiter in column 1 of the line and the character '%' in column 2.

This information is used by the coverage monitor. The coverage monitor (see INSERT COVERAGE) counts the number of times each executable statement is visited. Statements are classified as main code or as exception handlers, and a separate count is maintained for each. Exception handlers are statements which are reached only from ERR= exits from statements, usually I/O statements, or which are marked as exception handlers by this command.

Where to Use this Command

Operating system command line No
Configuration file, config.fsp No
Specification (fsp) files, *.fsp No
Interactively, to FPT> prompt No
Interactive command files No
Embedded in the Fortran code Yes

Example

!% EXCEPTION 999 CONTINUE CALL err_report('Too many items in list') CALL EXIT

See Also

INSERT COVERAGE MONITOR

Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.