-
-
Notifications
You must be signed in to change notification settings - Fork 246
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
Allow throwing a SyntaxError #833
Comments
The original Node-API doesn't expose ability to create |
you're correct, I'm working on it :) |
See https://github.com/napi-rs/napi-rs/releases/tag/napi%401.7.8 There is a workaround for this scenario |
thank you! now that I take a look better, seems like do you think we need to add it in a similar way or wait for the napi PR to be merged & deployed? |
@Brooooooklyn hey, nodejs/node#40736 was merged and released in v17.2.0 (nodejs/node#40983). I'd be happy to contribute to napi-rs with this new addition. Can you please guide me? should I just add it here under the |
And here https://github.com/napi-rs/napi-rs/blob/main/crates/napi/src/env.rs#L650 |
Hey,
Relatd to swc-project/swc#2650
I'd like to refine swc error handling and throw a
SyntaxError
instead of anError
.I see here that some global JS errors are supported, but not
SyntaxErrorr
.Any objections to support it?
If you're fine with adding it, I can contribute.
EDIT: I see
napi
doesn't have an API for that :( Any suggestions?The text was updated successfully, but these errors were encountered: