Previous: Error Values, Up: Error Handling [Contents][Index]
err: shishi error code.
Description: Converts the return code in err to a human readable string.
Return value: Returns a pointer to a statically allocated string containing a description of the error with code err. This string can be used to output a diagnostic message to the user.
handle: shishi handle as allocated by shishi_init()
.
Description: Extracts detailed information on the most recently occurred error condition. Note that memory is managed by the Shishi library, so the returned string must not be deallocated.
Return value: Returns a pointer to a string describing an error. The string must not be deallocated by the caller.
handle: shishi handle as allocated by shishi_init()
.
Description: Clears the internal error description. See shishi_error()
on how to access the error string, and shishi_error_set()
as well
as shishi_error_printf()
on how to set the error string.
This function is mostly for Shishi’s internal use, but if you develop an extension of Shishi, it may be useful to support the same error handling infrastructure.
handle: shishi handle as allocated by shishi_init()
.
errstr: A null-terminated character string holding a description,
or NULL
to clear the internal error string.
Description: Sets the error description to the content of errstr. The string is copied into the Shishi internal structure, so you can deallocate any string passed to this function.
This function is mostly for Shishi’s internal use, but if you develop an extension of Shishi, it may be useful to support the same error handling infrastructure.
handle: shishi handle as allocated by shishi_init()
.
format: printf style format string.
...: printf style arguments.
Description: Sets the internal error description to a printf(3) formatted string. This function is mostly for Shishi’s internal use, but if you develop an extension of Shishi, it may be useful to support the same infrastructure for error handling.
handle: shishi handle as allocated by shishi_init()
.
Description: Reports the current output type used in message logging.
Return value: Returns the output type. SHISHI_OUTPUTTYPE_NULL
means no output. SHISHI_OUTPUTTYPE_STDERR
and
SHISHI_OUTPUTTYPE_SYSLOG
direct text to the console, or to the
syslog system.
handle: shishi handle as allocated by shishi_init()
.
type: output type, of enum type Shishi_outputtype
.
Description: Sets the output type (NULL
, stderr
or syslog
) used for information
and warning messages. Intended values are SHISHI_OUTPUTTYPE_NULL
,
for no output at all, SHISHI_OUTPUTTYPE_STDERR
for output to the
console, and SHISHI_OUTPUTTYPE_SYSLOG
for syslog messaging.
The first value covers everything different from the latter two values.
handle: shishi handle as allocated by shishi_init()
.
format: printf style format string.
...: printf style arguments.
Description: Prints an informational message, composed from the arguments, to the output stream set in handle.
handle: shishi handle as allocated by shishi_init()
.
format: printf style format string.
...: printf style arguments.
Description: Prints a warning, composed from the arguments, to the output stream set in handle.
handle: shishi handle as allocated by shishi_init()
.
format: printf style format string.
...: printf style arguments.
Description: Prints a diagnostic message, composed from the arguments, to the output stream set in handle. The current verbosity setting determines whether the message is actually printed, or is suppressed due to low significance.
Previous: Error Values, Up: Error Handling [Contents][Index]