-
Notifications
You must be signed in to change notification settings - Fork 45
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
Add an option for automatically handling exceptions #21
Comments
I would really love this feature. So instead of this:
I would get something much simpler. |
+1 for this feature. Exceptions are not FFI-safe, and should be handled at boundaries. However, some code is guaranteed to be exception-free, e.g. using In spirit of Rust, exception handling wrapper should be opt-out (on be default) instead of opt-in, which brings us to a question of choosing an appropriate syntax for the macro — or add new macro, like |
IMHO A Result is more inline than a panic! because a lot of this would be used to write libraries and libraries should not panic! |
If the C++ code captured throws an exception, it might be nice to have an option for rust-cpp to add an exception handler which translates the exception into a rust panic.
This would have overhead so we may not want it to be the default.
The text was updated successfully, but these errors were encountered: