DataBasic Reference > DataBasic Exception Handler > Total Number of Exception Handlers Defined - ECATCH.ACTIVE()

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.ACTIVE() Function (dbasic_exception_hndlr_ecatchactive.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

ECATCH.ACTIVE() Function

The DataBasic ECATCH.ACTIVE function returns the total number of active exception catch labels defined in this or earlier code levels.

Syntax

ECATCH.ACTIVE()

Example

OPEN "ROOMS" TO ROOMS ELSE
   IF ECATCH.ACTIVE() THEN
      ETHROW 77,"Missing ROOMS file"
   END ELSE
      STOP 201,"ROOMS"
   END
END

Attempt to open the ROOMS file and, if this fails, test if an exception catch has been defined. If one has been defined, then throw a user defined exception number 77 with the message of "Missing ROOMS file", transferring control to the defined exception catch label. Otherwise stop with error message 201 and parameter "ROOMS".

See Also

DataBasic Exception Handler

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