-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
src,doc: add SyntaxError napi support #40736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
bdf8809
2f2a2b3
6fafc06
d3e7ac7
a9cc563
c22c337
5c52bec
f733054
c6adcb4
e0398c6
e4165cc
99216f4
606cc0b
f2c8ad6
a8906c4
8c2a1b3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,10 @@ NAPI_EXTERN napi_status napi_create_range_error(napi_env env, | |
| napi_value code, | ||
| napi_value msg, | ||
| napi_value* result); | ||
| NAPI_EXTERN napi_status napi_create_syntax_error(napi_env env, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a new api and it should be enabled / disabled throw #ifdef NAPI_EXPERIMENTAL
NAPI_EXTERN
napi_status napi_create_syntax_error(napi_env env,
napi_value code,
napi_value msg,
napi_value* result);
#endif // NAPI_EXPERIMENTAL |
||
| napi_value code, | ||
| napi_value msg, | ||
| napi_value* result); | ||
|
mhdawson marked this conversation as resolved.
Outdated
|
||
|
|
||
| // Methods to get the native napi_value from Primitive type | ||
| NAPI_EXTERN napi_status napi_typeof(napi_env env, | ||
|
|
@@ -370,6 +374,9 @@ NAPI_EXTERN napi_status napi_throw_type_error(napi_env env, | |
| NAPI_EXTERN napi_status napi_throw_range_error(napi_env env, | ||
| const char* code, | ||
| const char* msg); | ||
| NAPI_EXTERN napi_status napi_throw_syntax_error(napi_env env, | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a new api and it should be enabled / disabled throw #ifdef NAPI_EXPERIMENTAL
NAPI_EXTERN
napi_status napi_throw_syntax_error(napi_env env,
const char* code,
const char* msg,);
#endif // NAPI_EXPERIMENTAL
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. sure, it's here: 6fafc06
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NickNaso I see that adding this I assume it's either that the compiler is stricter on Mac (or defined to be stricter), or that the tests in this setup are not running with What do you recommend to do?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should add this declaration: #define NAPI_EXPERIMENTALto the head of file
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @NickNaso Thanks. It helped. The failing action ( I don't have the permissions to re-run. can you please?
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Please @idan-at could you please rename the functions you added like reported below?
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. of course - did it here a9cc563 |
||
| const char* code, | ||
| const char* msg); | ||
|
mhdawson marked this conversation as resolved.
Outdated
|
||
| NAPI_EXTERN napi_status napi_is_error(napi_env env, | ||
| napi_value value, | ||
| bool* result); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.