Error Codes and Formats
Definitions All error codes and their definitions will be in a text file that will be processed to get to the needed C/C++/Java files that will do the error handling and error code definitions. For the error codes their are some definitions that are important: 1. Error Name 2. Error Number 3. Error Importance or Level 4. Error Response 5. Error Message Error Name This is the base name for the error code value. Their would most likely be something prepended to ensure that it is always a valid name. The name must be all uppercase and if not it will be changed to be all upper case. Error Number This is a number bigger than 0 and smaller than 0xFFFFFFFF that will become the numerical value of the error code. To minimize confusion some standards have been decided:The following error code ranges must be observed:
Generic Errors: 0x0000 0x0FFF.
Communications Errors: 0x1000 0x1FFF
Configuration Parsing Errors: 0x2000 0x2FFF
Front-end Specific Errors: 0x3000 0x3FFF
Back-end Specific Errors: 0x4000 0x4FFF
Error number 0 is reserved for the state where there are no errors.
Error Importance or Level These can be one of the following words: - EMERG(system is unusable) - ALERT(action must be taken immediately) - CRIT (critical conditions) - ERR(error conditions) - WARNING (warning conditions) - NOTICE (normal but significant condition) - INFO (informational) - DEBUG(debug-level messages) These give a level of importance to the error message and can be used for some automation in the error handling. Error Response This can be one of the following words: - PANIC (Extremely bad error. Try to stop everything before it worsens) - ABORT (Abort process nicely) - RETRY (Retry action) - FALLOVER (Fall over to alternative resource otherwise retry) - ALERT (Inform the user/administrator of the event but continue) - IGNORE (Ignore this error) This gives a recommended action for error conditions. This would be useful to automate the error handling. Error Message This is a text message that will be presented to the user/log file/alert to describe the problem. This will always be a fixed string with no macro expansion. Error Format There must be only one error definition per line. The fields as described will be separated using ":" characters. The Error Message will be enclosed in double quotes ("). Example: NOERR:0:DEBUG:IGNORE:"Success" NOOPEN:1:ERR:ABORT:"Unable to open file"