Graceful exit on broke step file
- Dominant language
- Python
- Stars
- 5.8k
- Forks
- 541
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 5
Description
We run Flask app that converts step files to stl for further processing. When we were testing the app we noticed that when supplied with manually broken step file, the cadquery library _crash_ gracefully our Flask app. No Error is raised. We tried catching SystemExit with no avail. The app just stops.
I've traced cadquery inner works up to this point:

at which the `reader.TransferRoot(i + 1)` closes our app.
I don't know how to trace it further inside OCP, so I can't investigate further.
The problem is that, such files can close our service, we have no means to prevent it and results in service downtimes while it's being restarted.
We need to find a way to prevent it from closing the app.
## To Reproduce
[repro repo](https://github.com/qbamca/cadquery-bug-repro)
It's a flask app. Run main.py and post file BROKE_FILE.STEP
## Backtrace
```
no backtrace
```

## Environment
OS:
Ubuntu 22.04.2 LTS
python 3.10.12
cadquery v2.3.1
cadquery is installed using pip.
Using: Python interpreter
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.