mirror of
https://github.com/oven-sh/bun
synced 2026-02-12 20:09:04 +00:00
zig: handle termination exception from promise fulfullment/rejection (#23285)
This commit is contained in:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user