---
name: "giiPanic"
section: "3gii"
platform: "linux"
package: "libgii0-dev"
version: "1:0.8.1-1"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/giiPanic/3gii"
---

# giiPanic(3gii)

Exit LibGII programs for fatal errors

## NAME

giiPanic - Exit LibGII programs for fatal errors

## SYNOPSIS

**#include \<ggi/gii.h\>**

**void giiPanic(const char \****format***,**  *...***);** .SH "DESCRIPTION"

**ggiPanic** shuts down the application, closing all inputs, with [**printf**(3)](/printf/3.md) -style reporting to stderr, taking a format string and any additional variables.

**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");
}

```
