fn into_js_error(err: impl std::error::Error) -> JsValue {
    // Note that we could just return err.to_string().into().
    // However, in that case we would not get the stack trace.
    js_sys::Error::new(&err.to_string()).into()
}
// Turns any given std::error::Error into a JS error message
Turns any given std::error::Error into a JS error message
Turns any given std :: error :: Error into a JS error message
fn into_js_error(err: impl std::error::Error) -> JsValue {
    // Note that we could just return err.to_string().into().
    // However, in that case we would not get the stack trace.
    js_sys::Error::new(&err.to_string()).into()
}
fn into_js_error ( err : impl std :: error :: Error ) -> JsValue { // Note that we could just return err.to_string().into(). // However, in that case we would not get the stack trace. js_sys :: Error :: new ( & err . to_string ( ) ) . into ( ) }
Turns any given std::error::Error into a JS error message
Turns any given std :: error :: Error into a JS error message
err
impl std::error::Error
err
impl std::error::Error