NAME

caterr_verror - generate error message

SYNOPSIS

#include <cat/cat.h>

void caterr_verror(cat_session *sess, const char *function, int major_code, int retval, const char *fmt, va_list ap);

DESCRIPTION

This function is similar to caterr_error(), but takes a va_list instead of a variable number of arguments, so this function can be called from inside a function that takes a variable number of arguments.

EXAMPLE

 void
 give_up(const char *fmt, ...)
 {
     va_list ap;

     va_start(ap, fmt);
     caterr_verror(NULL, "give_up", CAT_FATAL, 0, fmt, ap);
     fprintf(stderr, "\n**** FATAL ERROR: Giving up ****\n");
     vfprintf(stderr, fmt, ap);
     fprintf(stderr, "\n**** ABORT\n");
     va_end(ap);

     abort();
 }

SEE ALSO

cat, caterr, caterr_error