PetscFunctionBegin — PETSc 3.21.4 documentation

Skip to main content
`Ctrl`+`K`

# PetscFunctionBegin

First executable line of each PETSc function, used for error handling. Final line of PETSc functions should be `PetscFunctionReturn`(0);

## Synopsis

    #include <petscsys.h>
    void PetscFunctionBegin;

Not Collective; No Fortran Support

## Usage

         int something;

         PetscFunctionBegin;

## Note

Use `PetscFunctionBeginUser` for application codes.

## See Also

`PetscFunctionReturn()`, `PetscFunctionBeginHot()`, `PetscFunctionBeginUser()`, `PetscStackPushNoCheck()`

## Level

developer

## Location

include/petscerror.h

Index of all Sys routines
Table of Contents for all manual pages
Index of all manual pages