giiPanic

Name

giiPanic — Exit LibGII programs for fatal errors

#include <ggi/gii.h>

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

Description

giiPanic does a graceful shutdown, with printf(3)-style reporting, taking a format string and any additional variables. It will close all inputs, print the given error message to stderr, and then exit the application.

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.

Return value

Never returns.

Examples

Example 3-1. An unrecoverable error


if (my_important_struct->magic != MAGIC) {
	giiPanic("Fatal error: magic corrupted\n");
}