[ prev :: next :: up ] libgii-current (3)

Exit LibGII programs for fatal errors

Name

giiPanic : Exit LibGII programs for fatal errors

Synopsis

#include <ggi/gii.h>

`int giiPanic(const char * format, ...);

Description

ggiPanic shuts down the application, closing all inputs, with :man:`printf(3)`-style reporting to stderr, taking a format string and any additional variables.

System Message: ERROR/3 (../ggi-core/libgii/doc/libgii.txt, line 161); backlink

Unknown interpreted text role "man".

giiPanic should only be used by usermode programs when something is really screwed, and they do not know what to do. The same applies for libraries, but might be used in rare situations such as corruption of critical data structures.

Examples

An unrecoverable error:

if (my_important_struct->magic != MAGIC) {
  giiPanic("Fatal error: magic corrupted\n");
}
 
[ prev :: next :: up ] libgii-current (3)
2006/11/09 16:50:57