Closed
Description
Version
v17.9.0
Platform
Microsoft Windows NT 10.0.22000.0 x64
Subsystem
No response
What steps will reproduce the bug?
const p = new Promise((resolve, reject) => { })
try {
await p
}
catch {
console.log("unresolvable promise detected")
}
How often does it reproduce? Is there a required condition?
Always. No required condition.
What is the expected behavior?
This will crash the execution. Instead, shouldn't this be an exception?
If this can be detected to allow NodeJS to end execution, otherwise it would await forever, why not make it an exception to allow Javascript programs detect this condition, on the await
promise statement.
What do you see instead?
NodeJS just stops executing and exists without any possibility of control from the executing script.
Additional information
No response
Metadata
Metadata
Assignees
Labels
No labels