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

Catch panics in event handlers #49

Open
Boddlnagg opened this issue Dec 22, 2017 · 0 comments
Open

Catch panics in event handlers #49

Boddlnagg opened this issue Dec 22, 2017 · 0 comments

Comments

@Boddlnagg
Copy link
Collaborator

Panics should generally never cross FFI boundaries (it's undefined behavior according to https://static.rust-lang.org/doc/master/std/panic/fn.catch_unwind.html).

Catch the panic using catch_unwind, and convert it into an appropriate HRESULT value (possibly E_FAIL).

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

1 participant