Skip to content

Commit f2ca7b5

Browse files
committed
fixup! Improve error reporting on JS loading errors
1 parent 8212eac commit f2ca7b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/extensions/tedge_gen_mapper/src/js_runtime.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,12 +273,12 @@ impl<'js> JsModules<'js> {
273273
}
274274

275275
impl LoadError {
276-
fn from_js<'js>(ctx: &Ctx<'js>, err: rquickjs::Error) -> Self {
276+
fn from_js(ctx: &Ctx<'_>, err: rquickjs::Error) -> Self {
277277
if let Some(ex) = ctx.catch().as_exception() {
278278
let err = anyhow::anyhow!("{ex}");
279279
err.context("JS raised exception").into()
280280
} else {
281-
let err = CaughtError::from_error(&ctx, err);
281+
let err = CaughtError::from_error(ctx, err);
282282
let err = anyhow::anyhow!("{err}");
283283
err.context("JS runtime error").into()
284284
}

0 commit comments

Comments
 (0)