astSetPutErr

Register an error handling function 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 ??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.

Synopsis

void astSetPutErr( void (fun)(int,const char) )

Parameters:

fun
A Pointer to the function to be used to handle errors. The interface for this function is described below. Once a function has been provided, a NULL pointer can be supplied in a subsequent call to astSetPutErr to reset the function to the corresponding function selected at link-time.

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:

void PutErr( int status_value, const char message )