aboutsummaryrefslogtreecommitdiff
path: root/src/javascript/jsc/bindings/helpers.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-01 19:04:38 -0700
committerGravatar Jarred Sumner <jarred@jarredsumner.com> 2021-08-01 19:04:38 -0700
commit85b6d448cebcb305dce4dee4b7fb96e309e5b94e (patch)
treebffeca8050173c801ba092d5b65d561b4d03dc1b /src/javascript/jsc/bindings/helpers.h
parent7245f90b2dd686acacb9c8ee03f5d8fb05e09aeb (diff)
downloadbun-85b6d448cebcb305dce4dee4b7fb96e309e5b94e.tar.gz
bun-85b6d448cebcb305dce4dee4b7fb96e309e5b94e.tar.zst
bun-85b6d448cebcb305dce4dee4b7fb96e309e5b94e.zip
hm
Former-commit-id: 0dc1c1a74b845d037326f4f2facd786924ca722e
Diffstat (limited to 'src/javascript/jsc/bindings/helpers.h')
-rw-r--r--src/javascript/jsc/bindings/helpers.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/javascript/jsc/bindings/helpers.h b/src/javascript/jsc/bindings/helpers.h
index a24ecefcb..e35dd34f4 100644
--- a/src/javascript/jsc/bindings/helpers.h
+++ b/src/javascript/jsc/bindings/helpers.h
@@ -124,9 +124,9 @@ static ZigString toZigString(JSC::Identifier *str, JSC::JSGlobalObject *global)
static WTF::StringView toStringView(ZigString str) { return WTF::StringView(str.ptr, str.len); }
-static void throwException(JSC::ThrowScope &scope, ZigString msg, JSC::JSGlobalObject *global) {
- auto str = toJSString(msg, global);
- scope.throwException(global, JSC::Exception::create(global->vm(), JSC::JSValue(str)));
+static void throwException(JSC::ThrowScope &scope, ZigErrorType err, JSC::JSGlobalObject *global) {
+ scope.throwException(
+ global, JSC::Exception::create(global->vm(), JSC::JSValue((JSC::EncodedJSValue)err.ptr)));
}
static ZigString toZigString(JSC::JSValue val, JSC::JSGlobalObject *global) {
@@ -144,6 +144,4 @@ static ZigString toZigString(JSC::JSValue val, JSC::JSGlobalObject *global) {
return toZigString(str);
}
-static ZigException ZigExceptionNone = ZigException{
- 0, 0, ZigStringEmpty, ZigStringEmpty, ZigStringEmpty, -1, -1, ZigStringEmpty, nullptr};
-} // namespace Zig
+}; // namespace Zig