STPerror(3) Impressario STPerror(3)NAME
STPerror, STErrorString - libstiff execution error handling
SYNOPSIS
#include <stdio.h>
#include <stiff.h>
void STPerror(char *s);
char* STErrorString(int err);
extern int STerrno;
DESCRIPTION
STPerror prints error messages to standard error in a format similar to
the standard C library function perror(3C). If an error occurs during a
libstiff function call, the global error variable STerrno will be set
with an error code. The symbolic names for these error codes are defined
in stiff.h.
The value of STerrno is used by STPerror as an index to a table of error
messages. This table is formatted as a list of strings. The error string
corresponding to a given error code can be obtained using the
STErrorString function.
A call to STPerror will print the user-supplied string s followed by a
colon (:), a space, and the error message corresponding to the current
value of STerrno. If the string s is the NULL string (""), no colon or
space will be printed, only the error message.
To be of most use, a call to STPerror should be made immediately
following the libstiff function call where an error has been detected.
NOTE
If an error occurs and STerrno is set to STESYSCALL, then the standard C
error variable errno can be used along with the standard C function
perror to obtain additional information about the error.
SEE ALSOlibstiff(3), perror(3C).
Page 1