DataBasic Reference > DataBasic Exception Handler > Define Exception Handler - ECATCH

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

ECATCH Statement (dbasic_exception_hndlr_ecatch.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

ECATCH Statement

The DataBasic ECATCH statement defines the label of the statement to which control should be transferred on receipt of an exception for the current and subsequent code levels. (The exception may be generated automatically by the system or a user via the ETHROW statement.)

Syntax

ECATCH exception-catch-label

Syntax Elements

exception-catch-label

The label of the statement to which control is to be transferred on receipt of an exception from this or a deeper level of the application return stack.

Operation

Within the same code level any subsequent ECATCH statements will redefine the exception catch label to be used on receipt of an exception.

An ECATCH statement will override an ECATCH at an earlier code level, but on return to the earlier code level the previous ECATCH label will become active again.

The defined exception catch label can be manually cleared using the ECLEARCATCH statement within the same code level.

Also, the ECATCH will automatically be cleared whenever control is transferred to the defined catch label on receipt of a system or user exception.

After an exception has been handled, the exception code can be redefined by re-specifying the ECATCH statement if required.

See Also

DataBasic Exception Handler

RealityV15.1 (MoTW) Revision 7Comment on this topic