# TSSetErrorIfStepFails
Immediately error if no step succeeds 
## Synopsis
```
#include "petscts.h"  
PetscErrorCode TSSetErrorIfStepFails(TS ts, PetscBool err)
```
Not Collective


## Input Parameters

- ***ts -*** `TS` context
- ***err -*** `PETSC_TRUE` to error if no step succeeds, `PETSC_FALSE` to return without failure



## Options Database Key

- ***-ts_error_if_step_fails -*** Error if no step succeeds





## See Also
 [](chapter_ts), `TS`, `TSGetSNESIterations()`, `TSGetKSPIterations()`, `TSSetMaxStepRejections()`, `TSGetStepRejections()`, `TSGetSNESFailures()`, `TSSetErrorIfStepFails()`, `TSGetConvergedReason()`

## Level
intermediate

## Location
<A HREF="PETSC_DOC_OUT_ROOT_PLACEHOLDER/src/ts/interface/ts.c.html#TSSetErrorIfStepFails">src/ts/interface/ts.c</A>


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


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