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
In a synchronous method inside of a Swift HybridObject, you cannot throw any errors because they are not propagated upwards to C++.
The previous workaround used result types (.success(value) or .failure(error)) instead of exceptions, but those will be caught and wrapped anyways. This didn't work because of a Swift compiler bug where arrays/generics couldn't be used inside enums, so we could only support primitives.
A workaround would be to just return a Promise<..>, then you can throw inside there which will be a promise rejection.
The text was updated successfully, but these errors were encountered:
In a synchronous method inside of a Swift HybridObject, you cannot throw any errors because they are not propagated upwards to C++.
The previous workaround used result types (
.success(value)
or.failure(error)
) instead of exceptions, but those will be caught and wrapped anyways. This didn't work because of a Swift compiler bug where arrays/generics couldn't be used inside enums, so we could only support primitives.A workaround would be to just return a
Promise<..>
, then you can throw inside there which will be a promise rejection.The text was updated successfully, but these errors were encountered: