Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions mquickjs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2113,6 +2113,11 @@ const char *JS_ToCString(JSContext *ctx, JSValue val, JSCStringBuf *buf)
return JS_ToCStringLen(ctx, NULL, val, buf);
}

int JS_HasException(JSContext *ctx)
{
return ctx->current_exception != JS_UNINITIALIZED;
}

JSValue JS_GetException(JSContext *ctx)
{
JSValue obj;
Expand Down
1 change: 1 addition & 0 deletions mquickjs.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,7 @@ int JS_ToUint32(JSContext *ctx, uint32_t *pres, JSValue val);
int JS_ToInt32Sat(JSContext *ctx, int *pres, JSValue val);
int JS_ToNumber(JSContext *ctx, double *pres, JSValue val);

int JS_HasException(JSContext *ctx);
JSValue JS_GetException(JSContext *ctx);
int JS_StackCheck(JSContext *ctx, uint32_t len);
void JS_PushArg(JSContext *ctx, JSValue val);
Expand Down