zig: make throw use JSError (#15444)

This commit is contained in:
Meghan Denny
2024-12-02 14:19:18 -08:00
committed by GitHub
parent 56ad4cc4a6
commit 2d441d868b
58 changed files with 872 additions and 1632 deletions

View File

@@ -474,8 +474,7 @@ pub const json = struct {
defer str.deref();
const parse_result = JSValue.parse(str.toJS(globalObject), globalObject);
if (parse_result.isAnyError()) {
globalObject.throwValue(parse_result);
return error.JSError;
return globalObject.throwValue(parse_result);
}
return parse_result;