PETSc version 3.16.1
CHKERRCXX
Checks C++ function calls and if they throw an exception, catch it and then return a PETSc error code
Synopsis
#include <petscsys.h>
CHKERRCXX(func);
Not Collective
Input Parameters
| func | - C++ function calls
|
Notes
For example,
void foo(int x) {throw std::runtime_error("error");}
CHKERRCXX(foo(1));
See Also
PetscTraceBackErrorHandler(), PetscPushErrorHandler(), PetscError(), SETERRQ(), CHKERRQ(), CHKMEMQ
Level
beginner
Location
src/sys/error/../../../include/petscerror.h
Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages