petsc-3.7.1 2016-05-15
PetscPushErrorHandler
Sets a routine to be called on detection of errors.
Synopsis
#include "petscsys.h"
PetscErrorCode PetscPushErrorHandler(PetscErrorCode (*handler)(MPI_Comm comm,int,const char*,const char*,PetscErrorCode,PetscErrorType,const char*,void*),void *ctx)
Not Collective Many br
Input Parameters
| handler | - error handler routine Many br |
| ctx | - optional handler context that contains information needed by the handler (for Many brexample file pointers for error messages etc.) Many br |
Calling sequence of handler
int handler(MPI_Comm comm,int line,char *func,char *file,PetscErrorCode n,int p,char *mess,void *ctx);
| comm | - communicator over which error occured Many br |
| line | - the line number of the error (indicated by __LINE__) Many br |
| func | - the function where the error occured (indicated by __FUNCT__) Many br |
| file | - the file in which the error was detected (indicated by __FILE__) Many br |
| n | - the generic error number (see list defined in include/petscerror.h) Many br |
| p | - PETSC_ERROR_INITIAL if error just detected, otherwise PETSC_ERROR_REPEAT Many br |
| mess | - an error text string, usually just printed to the screen Many br |
| ctx | - the error handler context Many br |
Options Database Keys