Function PGAErrorPrintf

Function Documentation

void PGAErrorPrintf(PGAContext *ctx, int level, char *fmt, ...)

Report error messages using printf-like interface.

Description

Prints out the message supplied, and optional parameters. Uses a printf-style interface. Terminates if PGA_FATAL. Note that compared to PGAError() msg and level are exchanged, seems more natural. See Constants for Error Printing Flags for the level constants and Miscellaneous in the user guide for more information.

Example

PGAContext *ctx;
int         val;

...
PGAErrorPrintf (ctx, PGA_WARNING, "Some Non Fatal Error: val = %d", val);
PGAErrorPrintf (ctx, PGA_FATAL, "A Fatal Error!");

Parameters:
  • ctx – context variable

  • level – indicate the error’s severity

  • fmt – the printf-style format to print

  • ... – additional parameters depending on format string in msg

Returns:

None