zig: handle termination exception from promise fulfullment/rejection (#23285)

This commit is contained in:
Meghan Denny
2025-10-14 18:48:25 -08:00
committed by GitHub
parent c3bfff58d9
commit 0eb470fd88
83 changed files with 930 additions and 779 deletions

View File

@@ -14,6 +14,7 @@ pub const AnyPostgresError = error{
InvalidServerSignature,
InvalidTimeFormat,
JSError,
JSTerminated,
MultidimensionalArrayNotSupportedYet,
NullsInArrayNotSupportedYet,
OutOfMemory,
@@ -111,6 +112,9 @@ pub fn postgresErrorToJS(globalObject: *jsc.JSGlobalObject, message: ?[]const u8
error.JSError => {
return globalObject.takeException(error.JSError);
},
error.JSTerminated => {
return globalObject.takeException(error.JSTerminated);
},
error.OutOfMemory => {
// TODO: add binding for creating an out of memory error?
return globalObject.takeException(globalObject.throwOutOfMemory());