JonasKruckenberg / tauri-sys

Bindings to the Tauri API for projects using wasm-bindgen
Apache License 2.0
84 stars 21 forks source link

A way to get proper errors #26

Closed jrouaix closed 6 months ago

jrouaix commented 1 year ago

Hello,

Whould it be nice to have access to errors when invoke ?

like : pub mod error; in the lib ?

and a simple :

pub enum Error {
    #[error("JS Binding: {0:?}")]
    Binding(#[from] JsValue),

Same is perhaps better on Error::Serde (the #[from] part without transforming the value)

I tried to change that on a fork but the builds & tests didn't get far, is the project looking for maintainers ?

JonasKruckenberg commented 6 months ago

The error enum is public now, a larger change to the way custom errors are propagated is a bit more tricky, see #18 for details on that.