Exceptions
Incorrect use of the system Helper classes by the API programmer
results in exceptions. These are of the type CloverleafException
, which extends java.lang.Exception
.
The extendable methods of TPS, TrxID, and XLT are declared as throwing
CloverleafException
; therefore it is acceptable
to let any errors be caught by the system itself.
These are treated in this manner:
- If the exception is generated during processing associated with a message, then a stack trace of the error is printed in the engine log. It is also stored in the message metadata as its error context. The message is then sent to the error database.
- If the exception is generated during processing that is not associated with a message, then a stack trace is printed in the log. No other action is taken. Typically, this is in Start or Time mode in a TPS.
A requirement to notify someone of exceptions relating to messages is often addressed by one of these:
- Configuring a system alert based on the error-count criterion of a thread or group of threads.
- Using a configurable
exception file that is referred to from UPoC code in validation logic or catch
blocks, using the
notifyException
.
CloverleafException
has two specialized subclasses:
-
PropertyTree.PropertyTreeException
which deals with incorrect use ofPropertyTree
tree structures. -
DispositionList.InvalidDispositionException
which deals with invalid dispositions.