summaryrefslogtreecommitdiff
path: root/ops/lib.rs
diff options
context:
space:
mode:
authorNayeem Rahman <nayeemrmn99@gmail.com>2022-08-11 10:57:20 +0100
committerGitHub <noreply@github.com>2022-08-11 11:57:20 +0200
commit25a1cc1b28ee2f37deb6305c0feb66d4eec50804 (patch)
tree4ddbedaaeb9fe30845e1e617df73a677d0d196c3 /ops/lib.rs
parent321a42d1fbab8dd8869749b44b560bbbc4f5872a (diff)
refactor(core): unwrap sync ops in rust (#15449)
Diffstat (limited to 'ops/lib.rs')
-rw-r--r--ops/lib.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/ops/lib.rs b/ops/lib.rs
index fdafca165..42913160b 100644
--- a/ops/lib.rs
+++ b/ops/lib.rs
@@ -399,8 +399,8 @@ fn codegen_sync_ret(
#ok_block
},
Err(err) => {
- let err = #core::OpError::new(op_state.get_error_class_fn, err);
- rv.set(#core::serde_v8::to_v8(scope, err).unwrap());
+ let exception = #core::error::to_v8_error(scope, op_state.get_error_class_fn, &err);
+ scope.throw_exception(exception);
},
};
}