From e02472dabc97aca5a49697573c6cf7766cb2a118 Mon Sep 17 00:00:00 2001 From: bellard <6490144+bellard@users.noreply.github.com> Date: Thu, 30 May 2024 14:28:49 +0200 Subject: [PATCH] Revert "Add `JS_HasException()` (#265)" This reverts commit db9dbd0a2b6d115c9ef3c0dc37e0c669ef4844e4. --- quickjs.c | 5 ----- quickjs.h | 1 - 2 files changed, 6 deletions(-) diff --git a/quickjs.c b/quickjs.c index f000ff7..9caca43 100644 --- a/quickjs.c +++ b/quickjs.c @@ -6402,11 +6402,6 @@ JSValue JS_GetException(JSContext *ctx) return val; } -JS_BOOL JS_HasException(JSContext *ctx) -{ - return !JS_IsNull(ctx->rt->current_exception); -} - static void dbuf_put_leb128(DynBuf *s, uint32_t v) { uint32_t a; diff --git a/quickjs.h b/quickjs.h index edc7b47..c20f9d5 100644 --- a/quickjs.h +++ b/quickjs.h @@ -633,7 +633,6 @@ static inline JS_BOOL JS_IsObject(JSValueConst v) JSValue JS_Throw(JSContext *ctx, JSValue obj); JSValue JS_GetException(JSContext *ctx); -JS_BOOL JS_HasException(JSContext *ctx); JS_BOOL JS_IsError(JSContext *ctx, JSValueConst val); void JS_SetUncatchableError(JSContext *ctx, JSValueConst val, JS_BOOL flag); void JS_ResetUncatchableError(JSContext *ctx);