:orphan:
# SNESGetErrorIfNotConverged
Indicates if `SNESSolve()` will generate an error if the solver does not converge? 
## Synopsis
```
#include "petscsnes.h"  
PetscErrorCode SNESGetErrorIfNotConverged(SNES snes, PetscBool *flag)
```
Not Collective


## Input Parameter

- ***snes -*** iterative context obtained from `SNESCreate()`



## Output Parameter

- ***flag -*** `PETSC_TRUE` if it will generate an error, else `PETSC_FALSE`





## See Also
 [](ch_snes), `SNES`, `SNESSolve()`, `SNESSetErrorIfNotConverged()`, `KSPGetErrorIfNotConverged()`, `KSPSetErrorIfNotConverged()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/snes/interface/snes.c.html#SNESGetErrorIfNotConverged">src/snes/interface/snes.c</A>


---
[Edit on GitLab](https://gitlab.com/petsc/petsc/-/edit/release/src/snes/interface/snes.c)


[Index of all SNES routines](index.md)  
[Table of Contents for all manual pages](/manualpages/index.md)  
[Index of all manual pages](/manualpages/singleindex.md)  
