All exceptions are posted to the SharedExceptionManagerModule.
To use exceptions,first initialize it
CALL initializeFTExceptions
From that point on, all exceptions will be posted there. Note that the
FTTestSuiteManager class will initialize the SharedExceptionManagerModule,
so there is no need to do the initialization separately if the FTTestSuiteManager
class has been initialized.
The exceptions are posted to a stack. To access the exceptions they will be
peeked or popped from that stack.
Initialization
CALL initializeFTExceptions
Finalization
CALL destructFTExceptions
Throwing an exception
CALL throw(exception)
Getting the number of exceptions
n = errorCount()
Getting the maximum exception severity
s = maximumErrorSeverity()
Catching all exceptions
IF(catch())THENDosomethingwiththeexceptionsENDIF
Getting the named exception caught
CLASS(FTException), POINTER :: e
e => errorObject()
Nodes of different colours represent the following:
Solid arrows point from a submodule to the (sub)module which it is
descended from. Dashed arrows point from a module or program unit to
modules which it uses.
private function catchErrorWithName(exceptionName)
Returns .TRUE. if there is an exception with
the requested name. If so, it pops the
exception and saves the pointer to it so that
it can be accessed with the currentError()
function.