Man page of auc_strerror(3) and auc_errno(3)

Index


NAME

auc_strerror, auc_errno - error handling facilities

SYNOPSIS

C/C++ #include <auc.h>

 const char * auc_strerror(auc_errno_t errno)

DESCRIPTION

The pseudo-variable auc_errno is of type auc_errno_t and allocated on a per thread basis using Thread-Local Storage. It provides a numerical representation of either the last error that occurred or an indicator that no error occurred. Whenever an error occurs within one of AutoUniConv's functions auc_conv(3) and auc_nconv(3), auc_errno is set to a value that describes the occurred error.

auc_strerror() returns a string describing a numerical auc_errno_t value.

RETURN VALUE

auc_strerror() returns a read-only string describing a numerical auc_errno_t value as given by the argument errno.

If the argument errno does not denote an error defined by auc_errno_t, the read-only string "Undefined error" is returned.

The memory the returned string is stored in must not be freed.

NAMED ERROR CONSTANTS (auc_errno_t)

AutoUniConv provides a complete set of named error constants, which are of auc_errno_t type. These named constants are particular useful to implement case dependent error handling and recovery.

In detail, the named constants defined by auc_errno_t and their assigned error descriptions as returned by auc_strerror() are:

AUC_NOERR

"No error"

AUC_ENOMEM

"Memory allocation failed"

AUC_EARG

"Invalid argument"

AUC_ESHORT

"Insufficient input length"

AUC_IDENT

"Identifying charset failed"

AUC_ENODEC

"No decoder available for charset"

AUC_EDEC

"Decoding failed"

AUC_EENC

"Encoding failed"

AUC_EBINARY

"Binary data input"

AUC_EEMBNUL

"Embedded NUL character"

NOTES

AutoUniConv's error handling facilities are thread-safe.

SEE ALSO

auc_conv(3), auc_nconv(3)

AutoUniConv User Manual