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".