# CHKERRQ
Checks error code returned from PETSc function 
## Synopsis
```
#include <petscsys.h>
void CHKERRQ(PetscErrorCode ierr)
```
Not Collective


## Input Parameters

- ***ierr -*** nonzero error code



## Notes
Deprecated in favor of `PetscCall()`. This routine behaves identically to it.




## See Also
 `PetscCall()`

## Level
deprecated

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscerror.h.html#CHKERRQ">include/petscerror.h</A>

## Examples
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/tutorials/ex5f.F90.html">src/snes/tutorials/ex5f.F90.html</A><BR>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/include/petscerror.h)


[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)  
