Error codes are 32 bit numbers in which the high 2 bits indicate severity as follows:
0 = informational 1 = warning 2 = error 3 = fatal
In this way, negative numbers indicate errors since the most significant bit is set. (The normal return for all routines is zero.) The next 14 most significant bits are used to encode a facility number. The low 16 bits encode an error number for that facility:
Status message names are of the form S_FAC_BRIEFERRMSG, where FAC is an abbreviation for the facility to which the status message belongs, and BRIEFERRMSG is a short name of the error message. The codes S_SUCCESS = 0 and S_FAILURE = -1 are shared by all facilities.
When using these routines, an object module containing a table of all known error codes and the corresponding status message names and strings is automatically linked into the application (if new error codes are defined, the application will need to be re-linked to recognize them).
The routine ceMsg() may be used to extract information from this table. If only the severity is requested, one character strings are returned (I, W, E, or F). If all is requested, a string of the following form is returned: Error: S_SC_BADVALTYP Bad value type specified (If the high bits were 01, then the message would start `Warning:', etc.).
The routine cePmsg prints an error message in the same format as above, prefixed by the string specified as the first argument in the call.