-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
the trait From<anyhow::Error>
is not implemented for JsValue
#2970
Comments
I suggest you look at gloo. |
You can't use
That's for converting from a JS error to a Rust error, which is the wrong way around here. |
@Liamolucko I can't seem to convert an anyhow::Error to a wasm_bindgen::JsError. e.g. I have a function that currently returns an anyhow error, and so I figured I'd try to manually convert it. That didn't work out.
|
Oops, I was wrong: It does implement let mut app = CpuApplication::new().map_err(|e| JsError::from(&*e))?;
|
See |
Summary
This code generates the following error when run with 0.2.81:
From #1742, I was expecting to be able to do this.
How can I use anyhow here?
The text was updated successfully, but these errors were encountered: