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
If serializations or deserializations fail in the code generated by macro #[dynamiclink] or #[callablepoints], the Err is unwrapped, and WASM panics.
I suggest improving the macros to enable generated functions to return Err(e) (e is made from serde::Error).
Design
It is not clear how to declare that "this function returns Err(e) when (de)serialization fails".
add an attribute like #[serde_err] to the function
all functions returning Result<T, E> returns Err(e)
2's compile is sometimes errors unexpectedly if serde::Error cannot automatically cast into E
The text was updated successfully, but these errors were encountered:
If serializations or deserializations fail in the code generated by macro
#[dynamiclink]
or#[callablepoints]
, theErr
is unwrapped, and WASM panics.I suggest improving the macros to enable generated functions to return
Err(e)
(e
is made fromserde::Error
).Design
It is not clear how to declare that "this function returns
Err(e)
when (de)serialization fails".#[serde_err]
to the functionResult<T, E>
returnsErr(e)
2's compile is sometimes errors unexpectedly if
serde::Error
cannot automatically cast intoE
The text was updated successfully, but these errors were encountered: