:orphan: # PetscFunctionBegin First executable line of each PETSc function, used for error handling. Final line of PETSc functions should be `PetscFunctionReturn`(0); ## Synopsis ``` #include void PetscFunctionBegin; ``` Not Collective; No Fortran Support ## Usage ```none int something; PetscFunctionBegin; ``` ## Note Use `PetscFunctionBeginUser` for application codes. ## See Also `PetscFunctionReturn()`, `PetscFunctionBeginHot()`, `PetscFunctionBeginUser()`, `PetscStackPushNoCheck()` ## Level developer ## Location include/petscerror.h ## Examples src/dm/dt/dualspace/impls/lagrange/tutorials/ex2.c
src/dm/field/tutorials/ex1.c
src/dm/impls/plex/tutorials/ex11.c
src/dm/impls/plex/tutorials/ex6.c
src/dm/impls/plex/tutorials/ex8.c
src/dm/label/tutorials/ex1.c
src/dm/tutorials/ex20.c
src/dm/tutorials/ex21.c
src/dm/tutorials/swarm_ex1.c
src/dm/tutorials/swarm_ex2.c
src/dm/tutorials/swarm_ex3.c
--- [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](/manualpages/index.md) [Index of all manual pages](/manualpages/singleindex.md)