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

Swift: Propagate callback errors directly #108

Closed
wants to merge 3 commits into from

Conversation

jrose-signal
Copy link
Contributor

This turned out to be easier to do in Swift than in Java, since we already have a Swift-side adapter that catches callback-thrown errors. I have the solution for Java too (#5), but that one's a Rust-side change on top of #76, so I'll put it up later.

This simplifies SignalProtocolError at the cost of an extra heap
allocation for other errors. On its own, that probably isn't worth it,
but this lays groundwork for propagating exceptions / errors back up
in the native environment.
@jrose-signal jrose-signal force-pushed the jrose/swift-propagate-callback-errors branch from 23ec26c to 686f74c Compare December 10, 2020 02:15
@jrose-signal
Copy link
Contributor Author

*sigh* This is what I get for trying to decompose a larger change. I'll come back to this later.

@jrose-signal jrose-signal deleted the jrose/swift-propagate-callback-errors branch December 10, 2020 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant