-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
Error message for when there code evaluation is still pending and there are no pending async operations #43562
Comments
What is your Node.js version ? This code(put into test.mjs) works in v16.6.0 and v19.0.0-pre. |
@theanarkh What do you mean by works? It's not supposed to work, it exits with an error code (13 - "Unfinished Top-Level Await") for me as documented here: https://nodejs.org/api/process.html#process_exit_codes I opened this issue to suggest adding a friendly error message along with code to inform users why the program exited without having to google the error code. This is what deno does and it's quite nice. |
Related issue: nodejs/promises-debugging#16, #43162 |
Duplicate of #42868 |
Sorry, i misunderstand it. i supposed what you mean is the process throw a Error and the code is 13. |
Close it in favor of #42868 |
What is the problem this feature will solve?
Given the following program:
Node.js exits the process immediately, with an error code of
13
.What is the feature you are proposing to solve the problem?
In addition to exiting with a non-zero code, show an error message.
This how deno works. Run the above program with
deno run
and you get the following error in the console:What alternatives have you considered?
No response
The text was updated successfully, but these errors were encountered: