impPerror(3) Impressario impPerror(3)NAME
impPerror, impErrorString - report libimp execution error messages
SYNOPSIS
#include <imp.h>
void impPerror(const char *str);
char* impErrorString(int errCode);
extern int IMPerrno;
DESCRIPTION
impPerror prints error messages to stderr in a format similar to the
standard C library function perror(3C). If an error occurs during a
libimp function call, the global error variable IMPerrno will be set with
an error code. The error code will either be a system error code (i.e.
errno) or a libimp specific code. The symbolic names for the libimp error
codes are defined in imp.h.
The value of IMPerrno is used by impPerror as an index to a table of
error messages. impPerror will print the user-supplied string str
followed by a colon (:), a space, and the error message corresponding to
the current value of IMPerrno. If the string str is the NULL string (""),
no colon or space will be printed, only the error message. The error
message will either be a system error message or a libimp specific
message.
To be of most use, a call to impPerror should be made immediately
following the libimp function call where an error has been detected.
impErrorString is similar to the strerror(3C) function and returns the
error message corresponding to the error code specified by errCode. If
errCode is less than IMP_ERR_BASE, the message returned is a system error
message generated by strerror. If errCode is one of the error codes
specified in imp.h, the returned string is a libimp specific error
message.
SEE ALSOlibimp(3), perror(3C), strerror(3C)
Page 1