### AST_SETPUTERR

Register an error handling routine for use by the AST error model

#### Description:

This function can be used to register an external function to be used to deliver an error message and (optionally) an accompanying status value to the user.

If this function is not called prior to the first error occuring within AST, then the external error handling function selected at link-time (using the ast_link command) will be used. To use an alternative error handler, call this function before using any other AST functions, specifying the external error handling function to be used. This will register the function for future use.

#### Invocation

CALL AST_GRFSET( FUN, STATUS )

#### Arguments

##### FUN = INTEGER FUNCTION (Given)
The name of the routine to be used to handle errors (the name should also appear in a Fortran EXTERNAL statement in the routine which invokes AST_SETPUTERR). Once a routine has been provided, the " null" routine AST_NULL can be supplied in a subsequent call to astSetPutErr to reset the routine to the corresponding routine selected at link-time. AST_NULL is defined in the AST_PAR include file.
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Function Interface

The supplied external function should deliver the supplied error message and (optionally) the supplied status value to the user or to some underlying error system. It requires the following interface:

SUBROUTINE PUTERR( STATUS_VALUE, MESSAGE )

• STATUS_VALUE = INTEGER (Given) - The error status value.

• MESSAGE = CHARACTER $\ast$ ( $\ast$ ) (Given) - The error message to be delivered.