You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
uniffi-bindgen-go provides some support for errors.Is, by generating a Go error value named Err<typename><variant> for each member of a "flat" UniFFI error.
However, not all UniFFI errors are "flat". Given this Rust error:
Actually, it looks like the generated Go code without #[uniffi(flat_error)]` always has a compile error:
bindings.go:6093:13: cannot use FfiConverterTypeFooBarErrorINSTANCE.Read(reader) (value of type error) as FooBarError value in struct literal: need type assertion
uniffi-bindgen-go
provides some support forerrors.Is
, by generating a Goerror
value namedErr<typename><variant>
for each member of a "flat" UniFFI error.However, not all UniFFI errors are "flat". Given this Rust error:
It should be possible to check for a value of type
OuterError::Inner{inner: InnerError::RootCause}
using this Go expression:To implement this, I expect that the Go version of
OuterError
would look something like this:The text was updated successfully, but these errors were encountered: