-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Python: Fix Interactive Inspection (#265)
When autocompleting the `ImpactX()` Python class, Ipython uses Jedi to look into the getters of properties. By default, the `ParmParse::get()` we use would throw an `amrex::Abort()`, which exits the interpreter. We could and should use `amrex.throw_exception = 1` and `amrex.signal_handling = 0` to make this a `std::runtime_error`. Unfortunately, this is still not sufficient to catch it, because C++ exception handlign accross shared libraries needs extra care. Thus, we just do a helper function, save some lines of code, and throw directly from ImpactX's Python module.
- Loading branch information
Showing
2 changed files
with
39 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters