ggiPanic(3ggi)

NAME
ggiPanic - Exit LibGGI programs for fatal errors

SYNOPSIS
#include <ggi/ggi.h>

int ggiPanic(const char *format, ...); .SH "DESCRIPTION"

ggiPanic does a graceful shutdown, with printf(3) -style reporting, taking a format string and any additional variables. It will shut down the graphics modes active, close all visuals, print the given error message to stderr, and then exit the application.

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: magic corrupted\n");
}