-
Notifications
You must be signed in to change notification settings - Fork 763
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add catch_unwind! macro to prevent panics crossing ffi boundaries
- Loading branch information
1 parent
c4f3653
commit a0eff02
Showing
5 changed files
with
73 additions
and
8 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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
use crate::exceptions::BaseException; | ||
|
||
/// The exception raised when Rust code called from Python panics. | ||
/// | ||
/// Like SystemExit, this exception is derived from BaseException so that | ||
/// it will typically propagate all the way through the stack and cause the | ||
/// Python interpreter to exit. | ||
pub struct PanicException { | ||
_private: (), | ||
} | ||
|
||
pyo3_exception!(PanicException, BaseException); |