Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Store panic payload in PanicException #853

Closed
davidhewitt opened this issue Apr 7, 2020 · 3 comments
Closed

Store panic payload in PanicException #853

davidhewitt opened this issue Apr 7, 2020 · 3 comments

Comments

@davidhewitt
Copy link
Member

To improve ergonomics of PanicException introduced in #797, we would ideally restore the original panic payload with panic::resume_unwind.

This isn't trivial to do as far as I can tell - ideally I'd make PanicException a proper #[pyclass] and then we could store the Box<dyn Any + Send + 'static> payload inside it.

In the interest of getting #797 completed to unblock other work, I decided to open this as a separate issue for the future.

@kngwyu
Copy link
Member

kngwyu commented Apr 8, 2020

What kind of use cases do you have in your mind?
I'm not sure how to use stored panic.

@davidhewitt
Copy link
Member Author

We should be calling std::panic::resume_unwind with the payload when we fetch a PanicException - see #797 (comment)

@davidhewitt
Copy link
Member Author

Now that we've decided to wait to think on #797 a little more I'm going to close this issue; we can incorporate this in the final design of #797.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants