Skip to content

Expose JS_ToBoolean(), JS_ToNumber(), JS_ToObject(), and JS_SetUncatchableError()#824

Merged
saghul merged 2 commits intoquickjs-ng:masterfrom
holepunchto:additional-apis
Jan 14, 2025
Merged

Expose JS_ToBoolean(), JS_ToNumber(), JS_ToObject(), and JS_SetUncatchableError()#824
saghul merged 2 commits intoquickjs-ng:masterfrom
holepunchto:additional-apis

Conversation

@kasperisager
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread quickjs.h
Comment thread quickjs.h Outdated
Comment thread quickjs.h Outdated
Comment thread quickjs.h Outdated
Comment thread quickjs.h
@saghul
Copy link
Copy Markdown
Contributor

saghul commented Jan 14, 2025

Thanks @kasperisager ! Feel free to open a PR adding your project here: https://quickjs-ng.github.io/quickjs/projects

@saghul saghul merged commit 7021858 into quickjs-ng:master Jan 14, 2025
Comment thread quickjs.h
JS_EXTERN JSValue JS_GetException(JSContext *ctx);
JS_EXTERN JS_BOOL JS_HasException(JSContext *ctx);
JS_EXTERN JS_BOOL JS_IsError(JSContext *ctx, JSValue val);
JS_EXTERN void JS_SetUncatchableError(JSContext *ctx, JSValue val, JS_BOOL flag);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't PR right away because that conflicts with #821 but IMO flag is too cryptic and should have been called something like is_uncatchable, or have been left out and been replaced with:

JS_EXTERN void JS_SetUncatchableError(JSContext *ctx, JSValue val);
JS_EXTERN void JS_ClearUncatchableError(JSContext *ctx, JSValue val);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please do, I'll rebase no problem. Sorry I pulled trigger too quickly 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants