RegisterMatherrHandler

Substitutes a custom routine for matherr

Local Servers:nonblocking
Remote Servers:N/A
Classification:3.12, 3.2, 4.x, 5.x, 6.x
Service:Mathematical Computation

Syntax

  #include <math.h>  
   
  int RegisterMatherrHandler  (  
     int   (*newFunc) (  
        struct exception  *));
  

Parameters

newFunc
(IN) Points to the routine to be used as matherr.

Return Values

RegisterMatherrHandler returns zero if successful. If a nonzero value is returned, an error occurred resulting in an error handler being registered. If an error occurs, it is most likely because the calling thread does not have CLib context.

If you have linked your program with the NWPRE.OBJ file, the RegisterMatherrHandler function returns a -1 and sets erno when an error occurs and no handler has been registered with RegisterMatherrHandler.

Remarks

RegisterMatherrHandler registers a routine ( newFunc) to be called in place of matherr.

If a routine has already been registered, RegisterMatherrHandler returns a nonzero value. The following deregisters a previously registered matherr handler:

     RegisterMatherrHandler(NULL);
  

The routine that is registered must meet the requirements of matherr.

See Also

matherr

Example

See the example for matherr.