#include "petscsys.h" PetscErrorCode PetscError(MPI_Comm comm,int line,const char *func,const char *file,PetscErrorCode n,PetscErrorType p,const char *mess,...)Collective on comm
|comm||- communicator over which error occurred. ALL ranks of this communicator MUST call this routine|
|line||- the line number of the error (indicated by __LINE__)|
|func||- the function name in which the error was detected|
|file||- the file in which the error was detected (indicated by __FILE__)|
|n||- the generic error number|
|p||- PETSC_ERROR_INITIAL indicates the error was initially detected, PETSC_ERROR_REPEAT indicates this is a traceback from a previously detected error|
|mess||- formatted message string - aka printf|
|-error_output_stdout||- output the error messages to stdout instead of the default stderr|
|-error_output_none||- do not output the error messages|
PETSc provides a rich supply of error handlers, see the list below, and users can also provide their own error handlers.
Most users need not directly use this routine and the error handlers, but can instead use the simplified interface SETERRQ, which has the calling sequence
PetscError(MPI_Comm comm,PetscErrorCode n,PetscErrorType p,char *message)
Set the error handler with PetscPushErrorHandler().
Developer Note: Since this is called after an error condition it should not be calling any error handlers (currently it ignores any error codes) BUT this routine does call regular PETSc functions that may call error handlers, this is problematic and could be fixed by never calling other PETSc routines but this annoying.