Next: , Previous: , Up: C Interface   [Contents][Index]


3.2 C Status Codes

C Preprocessor Macro: err_P (x)

Return x if a valid error code (-1 … MAXERR); else 0.

C Preprocessor Macro: success_P (x)

Not err_P.

C Preprocessor Constant: success

Successful execution (0).

Negative integers are used for errors according to increasingly severity, as follows:

C Preprocessor Constant: notpres

Successful execution; no data present or no change made.

C Preprocessor Constant: terminated

Failure; no damage; caller can retry operation.

C Preprocessor Constant: retryerr

Failure; no damage; caller can retry operation.

C Preprocessor Constant: keyerr

Failure, no damage, call was in error.

C Preprocessor Constant: argerr

Failure, no damage, call was in error.

C Preprocessor Constant: noroom

Failure, no damage, out of room in file.

C Preprocessor Constant: typerr

Failure, file or object was not of correct type.

C Preprocessor Constant: ioerr

I/O error, DB may be damaged.

C Preprocessor Constant: strangerr

Internal error, DB may be damaged.

C Preprocessor Constant: unkerr

Placeholder code.

C Preprocessor Constant: maxerr

All error codes are between 0 and ‘maxerr’.

3.2.1 C Diagnostic Channel

The machine translated source utilizes dprintf as a platform-independent way to log diagnostic, warning, and error messages. tdprintf

C Preprocessor Macro: dprintf ((diagout, const char *template, …))

The single argument to dprintf must be an argument list within parenthesis (eg. double parentheses). The first argument inside this list should be literally diagout. template is a printf style format string followed by the arguments for formatting, as with printf.


Next: C SEGs, Previous: C Compile-Time Parameters, Up: C Interface   [Contents][Index]