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

Handling errors #57

Open
dlukes opened this issue Jan 8, 2018 · 1 comment
Open

Handling errors #57

dlukes opened this issue Jan 8, 2018 · 1 comment

Comments

@dlukes
Copy link

dlukes commented Jan 8, 2018

It would be great to include some pointers on how to handle errors in a clean way. When a Rust function returns Result<T, E>, what's a good way of communicating that across the FFI boundary?

@dlukes
Copy link
Author

dlukes commented Jan 9, 2018

I asked how this could be done on Reddit and I was pointed to the getsentry/symbolic repository as a source of inspiration. I summarized their approach in this comment (hopefully I didn't get it too wrong).

I like the way they do it, it seems clean and natural, but then again it's the first approach I've seen (prior to this, I had no idea at all how to do error handling across the FFI boundary), so it's not like I have a very refined taste in this respect :)

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