Error
which is defined as follows:
void Error (char *ErrorMessage, INT ErrorCode, INT Severity)
The error severity level is divided into 4 classes where the class bounds are given by the values of the following variables:
INT ErrorHandler::WarningLevel
The initial value of this variable is 1000.
INT ErrorHandler::SevereLevel
ErrorHandler::WarningLevel
are printed as warning message and the program
execution is continued.
If the severity level is greater or equal than ErrorHandler::ErrorLevel
, it is
considered as an error message which is printed out and the program execution is
terminated.
The initial value of this variable is 2000.
A severity level of (-1) is considered as fatal error. The following subroutine is provided for simplicity:
void FatalError (char *ErrorMessage)
For the standard cases, the following variables are provided:
INT ErrorHandler::Ignore
This variable contains the value 0.
INT ErrorHandler::Warning
This variable contains the initial value of ErrorHandler::WarningLevel
.
INT ErrorHandler::SevereError
This variable contains the initial value of ErrorHandler::SevereLevel
.
INT ErrorHandler::Fatal
This variable contains the initial value of (-1).
The last used error code is also available:
INT ErrorHandler::LastErrorCode
Error
).
If not error leads to program termination, but warnings or ignored errors occured, an error report is generated either automatically at the end of the program or can be called anywhere using
void ErrorReport ()