# PetscErrorMessage
returns the text string associated with a PETSc error code. 
## Synopsis
```
#include "petscsys.h" 
PetscErrorCode PetscErrorMessage(int errnum, const char *text[], char **specific)
```
Not Collective


## Input Parameter

- ***errnum -*** the error code



## Output Parameters

- ***text -*** the error message (NULL if not desired)
- ***specific -*** the specific error message that was set with `SETERRQ()` or `PetscError()`.  (NULL if not desired)





## See Also
 `PetscPushErrorHandler()`, `PetscAttachDebuggerErrorHandler()`, `PetscError()`, `SETERRQ()`, `PetscCall()`
`PetscAbortErrorHandler()`, `PetscTraceBackErrorHandler()`

## Level
developer

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/sys/error/err.c.html#PetscErrorMessage">src/sys/error/err.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/sys/error/err.c)


[Index of all Sys routines](index.md)  
[Table of Contents for all manual pages](/docs/manualpages/index.md)  
[Index of all manual pages](/docs/manualpages/singleindex.md)  
