---
name: "PGAError"
section: "3"
platform: "linux"
package: "pgapack"
version: "1.0.0.1-3"
release: "Debian 3.1 (Sarge)"
platforms: ["linux"]
url: "https://new.carta.tech/PGAError/3"
---

# PGAError(3)

reports error messages. Prints out the message supplied, and the value of a piece of data. Terminates if PGA\_FATAL.

## NAME

PGAError - reports error messages.  Prints out the message supplied, and the value of a piece of data.  Terminates if PGA\_FATAL.

## INPUT PARAMETERS

- ctx

  \- context variable

- msg

  \- the error message to print

- level

  \- PGA\_WARNING or PGA\_FATAL to indicate the error's severity

- datatype

  \- the data type of the following argument

- data

  \- the address of the data to be written out, cast as a void pointer

## OUTPUT PARAMETERS

- none

  ## SYNOPSIS

```
#include "pgapack.h"
void  PGAError(ctx, msg, level, datatype, data)
PGAContext *ctx
char *msg
int level
int datatype
void *data
```

## LOCATION

system.c

## EXAMPLE

```
Example:
PGAContext *ctx;
int         val;
:
PGAError(ctx, "Some Non Fatal Error: val = ", PGA_WARNING, PGA_INT,
(void *) &val);
:
PGAError(ctx, "A Fatal Error!", PGA_FATAL, PGA_VOID, NULL);
```
