Skip to content

Commit 02c3389

Browse files
committed
simplify
1 parent 1e3d65c commit 02c3389

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

crates/core/src/lib.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,13 @@ static CALL_ARGS: std::sync::Mutex<Vec<Vec<ArgType>>> = std::sync::Mutex::new(ve
1818
fn check_exception(this: &Ctx, err: rquickjs::Error) -> anyhow::Error {
1919
let s = match err {
2020
rquickjs::Error::Exception => {
21-
// Attempt to catch the exception
22-
let exception_result = this.catch();
23-
2421
// Check if we got a valid exception or if it's uninitialized (possibly due to async code)
2522
// - https://github.com/DelSkayn/rquickjs/issues/421
2623
// - https://github.com/DelSkayn/rquickjs/pull/422
2724
// - https://github.com/quickjs-ng/quickjs/issues/39
2825
// - https://github.com/quickjs-ng/quickjs/pull/1038
2926

30-
match exception_result.into_exception() {
27+
match this.catch().into_exception() {
3128
Some(err) => {
3229
let msg = err.message().unwrap_or_default();
3330
let stack = err.stack().unwrap_or_default();

0 commit comments

Comments
 (0)