:orphan:
# SETERRABORT
Macro that can be called when an error has been detected, 
## Synopsis
```
#include <petscsys.h>
PetscErrorCode SETERRABORT(MPI_Comm comm,PetscErrorCode ierr,char *message,...)
```
Collective


## Input Parameters

- ***comm -*** A communicator, so that the error can be collective
- ***ierr -*** nonzero error code, see the list of standard error codes in include/petscerror.h
- ***message -*** error message in the printf format





## Notes
This function just calls `MPI_Abort()`.

This should only be called in routines that cannot return an error code, such as in C++ constructors.


## Fortran Note
Use `SETERRA()` in Fortran main program and `SETERRQ()` in Fortran subroutines


## Developer Note
In Fortran `SETERRA()` could be called `SETERRABORT()` since they serve the same purpose


## See Also
 `SETERRQ()`, `PetscTraceBackErrorHandler()`, `PetscPushErrorHandler()`, `PetscError()`, `PetscCall()`, `CHKMEMQ`

## Level
beginner

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/include/petscerror.h.html#SETERRABORT">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](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
