# SETERRQ

Macro that is called when an error has been detected, Not Collective

### Synopsis

    void SETERRQ(PetscErrorCode errorcode,char *message)

### Input Parameters

| errorcode | - nonzero error code, see the list of standard error codes in include/petscerror.h
| message | - error message

### Notes

Once the error handler is called the calling function is then returned from with the given error code.

See SETERRQ1(), SETERRQ2(), SETERRQ3() for versions that take arguments

Experienced users can set the error handler with PetscPushErrorHandler().

### See Also

PetscTraceBackErrorHandler(), PetscPushErrorHandler(), PetscError(), CHKERRQ(), CHKMEMQ, SETERRQ1(), SETERRQ2(), SETERRQ3()

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

### Examples

src/vec/vec/examples/tutorials/ex1.c.html
src/vec/vec/examples/tutorials/ex1e.c.html
src/vec/vec/examples/tutorials/ex6.c.html
src/vec/vec/examples/tutorials/ex9.c.html
src/vec/vec/examples/tutorials/ex1f.F.html
src/vec/vec/examples/tutorials/ex1f90.F.html
src/vec/vec/examples/tutorials/ex9f.F.html
src/vec/vec/examples/tutorials/ex14f.F.html
src/vec/is/examples/tutorials/ex2.c.html
src/vec/is/examples/tutorials/ex3.c.html
src/mat/examples/tutorials/ex1.c.html