# RunResult.raise_on_error
URL: https://lsd.tools/docs/api-runresult-raise-on-error
Updated: 2026-07-17

## Example

```python
Engine().run(pipeline).raise_on_error()   # the one-liner for tests
```

## Notes

Raises the run's captured exception when [`ok`](/docs/api-runresult-ok) is `False`; otherwise returns
**self** so it chains — `Engine().run(p).raise_on_error().output`. This is the canonical assertion
for tests and scripts that must fail loudly.

## See also

**API:** [ok](/docs/api-runresult-ok) · [print](/docs/api-runresult-print) · [output](/docs/api-runresult-output)
