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

Exit LibGGI programs for fatal errors

Name

ggiPanic : Exit LibGGI programs for fatal errors

Synopsis

#include <ggi/ggi.h>


void ggiPanic(const char *format, ...);

Description

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

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

Unknown interpreted text role "man".

ggiPanic 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.

Return value

Never returns.

Examples

An unrecoverable error:

if (my_important_struct->magic != MAGIC) {
      ggiPanic("Fatal error: structure is corrupted\n");
}
 
[ prev :: next :: up ] libggi-current (3)
2006/11/09 16:51:01