# CHKERRCXX
Checks C++ function calls and if they throw an exception, catch it and then return a PETSc error code 
## Synopsis
```
#include <petscerror.h>
void CHKERRCXX(func) noexcept;
```
Not Collective


## Input Parameter

- ***func -*** C++ function calls



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




## See Also
 `PetscCallCXX()`

## Level
deprecated

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


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