Commit 4d09691
authored
Geometry: Exceptions (#5219)
## Summary
We use AMReX interactively with `amrex.throw_exception = true` to be
able to handle user errors or convergence issues and act on them.
In Geometry, some methods are defined `noexcept` which breaks exception
propagation in ImpactX
BLAST-ImpactX/impactx#1348 and still aborts
the process as a consequence.
This removes the `noexcept` where they are not guaranteed to be true at
runtime. First seen in `computeRoundoffDomain` which is called from a
couple of places.
Performance impact for this host-side code should be minimal / not a
problem.
## Additional background
Throwing an actual abort in a Python script will abort the whole
interpreter, resetting all its state, terminating the process. That is a
big problem in interactive usage, e.g., Jupyter Notebooks, but also for
general C++ - Python and back error handling logic.
BLAST-ImpactX/impactx#1350
## Checklist
The proposed changes:
- [x] fix a bug or incorrect behavior in AMReX
- [ ] add new capabilities to AMReX
- [ ] changes answers in the test suite to more than roundoff level
- [ ] are likely to significantly affect the results of downstream AMReX
users
- [ ] include documentation in the code and/or rst files, if appropriate1 parent f4a778d commit 4d09691
2 files changed
Lines changed: 6 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
213 | | - | |
| 213 | + | |
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
0 commit comments