uniffi-rs
b97ffdca - Try to decode the error as a string and add to panic

Commit
3 years ago
Try to decode the error as a string and add to panic When the callback _does not_ specify an error to return we simply panic, but with a pretty generic error message. This makes it hard to debug if it ever fails. We do write the foreign-language exception into a buffer as a string (at least we try to), so we can include it in the panic message, hopefully making it easier to identify the issues in user code later on. It's hard to add a test for this, as it results in a Rust panic. We can't easily catch that in tests.
Author
Committer
Parents
Loading