Repository navigation
Support Type::Custom{ builtin: Enum|Object, .. } as throws type - #2658
Merged
Merged
Conversation
flisky
force-pushed
the
custom-throws-type
branch
2 times, most recently
from
September 18, 2025 13:28
c651ec9 to
0896acb
Compare
mhammond
requested changes
Sep 19, 2025
| {%- match callable.throws_type.ty %} | ||
| {%- when Some(e) %} | ||
| {%- match e.ty %} | ||
| {%- match e.ty.canonical() %} |
Member
There was a problem hiding this comment.
I think the right thing here is a new pipeline pass, eg, "error.rs"? It would walk Callable and adjust throws_type directly. This would also then handle CallbackInterfaceImpl.py
flisky
force-pushed
the
custom-throws-type
branch
from
September 22, 2025 07:21
0896acb to
df4d374
Compare
mhammond
approved these changes
Sep 23, 2025
jhugman
added a commit
to jhugman/uniffi-bindgen-react-native
that referenced
this pull request
Feb 25, 2026
Add `CustomTupleError` fixture to demonstrate and test custom types used
as error types. Update `ffi_error_converter_name` in filters.rs to unwrap
`Type::Custom { builtin }` when the builtin is an Enum or Object, so the
correct FfiConverter is used for error handling.
Corresponding to mozilla/uniffi-rs#2658
jhugman
added a commit
to jhugman/uniffi-bindgen-react-native
that referenced
this pull request
Feb 25, 2026
Add `CustomTupleError` fixture to demonstrate and test custom types used
as error types. Update `ffi_error_converter_name` in filters.rs to unwrap
`Type::Custom { builtin }` when the builtin is an Enum or Object, so the
correct FfiConverter is used for error handling.
Corresponding to mozilla/uniffi-rs#2658
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.