help
help copied to clipboard
enable exception for the embedder example
Node.js Version
v20
NPM Version
23
Operating System
win10
Subsystem
process
Description
I am using the embedder example: https://nodejs.org/api/embedding.html
Can somebody point out how to catch exception? For example, when there is a syntax error in the js code (console**..**log('hi');) , the process just exit with error code 1, I see nothing else. Even if try-catch used, it is not called at all.
Minimal Reproduction
Run the https://nodejs.org/api/embedding.html example, and give an invalid js code like console**..**log('hi');
Output
The process exit when reach node::LoadEnvironment, with error code 1.
Before You Submit
- [x] I have looked for issues that already exist before submitting this
- [X] My issue follows the guidelines in the README file, and follows the 'How to ask a good question' guide at https://stackoverflow.com/help/how-to-ask