Tracing exceptions
Exception can be logged in a file when using the STARTLOG()
function.
Exceptions are automatically logged in a file, if all the following conditions are true:
- The STARTLOG function has been previously called to specify the name of the exception logging file.
- The exception action is set to
CALL,GOTOorSTOP. Exceptions are not logged when the action isCONTINUEorRAISE. - The exception class is an
ERROR,ANY ERRORorWARNING.NOT FOUNDexceptions cannot be logged.
In other words, errors will not be logged in the case of WHENEVER { [ANY]
ERROR | WARNING } CONTINUE, or when controlled by a
TRY/CATCH block.
Each log entry contains:
- The system-time
- The location of the related instruction (source-file, line)
- The error-number
- The text of the error message, giving human-readable details for the exception