From 4b9d0ebdba3ace6b7f6de21c3e3806ab4055bd7e Mon Sep 17 00:00:00 2001 From: Cryse Hillmes Date: Tue, 10 Dec 2024 12:12:48 +0800 Subject: [PATCH] Expose `JS_IsUncatchableError` API. Very useful when handling errors. --- quickjs.h | 1 + 1 file changed, 1 insertion(+) diff --git a/quickjs.h b/quickjs.h index 6461283..9e8b511 100644 --- a/quickjs.h +++ b/quickjs.h @@ -618,6 +618,7 @@ JS_EXTERN JSValue JS_Throw(JSContext *ctx, JSValue obj); JS_EXTERN JSValue JS_GetException(JSContext *ctx); JS_BOOL JS_HasException(JSContext *ctx); JS_EXTERN JS_BOOL JS_IsError(JSContext *ctx, JSValue val); +JS_EXTERN JS_BOOL JS_IsUncatchableError(JSContext* ctx, JSValue val); JS_EXTERN void JS_ResetUncatchableError(JSContext *ctx); JS_EXTERN JSValue JS_NewError(JSContext *ctx); JS_EXTERN JSValue __js_printf_like(2, 3) JS_ThrowPlainError(JSContext *ctx, const char *fmt, ...);