Open
Description
There are a few places where code flows like this:
try {
// some code that produces `result` and can potentially throw
callback(null, result); // no error, return result
} catch(error) {
callback(error);
}
These are usually (if not always) bugs, because it wraps the callback
call itself in the try
block, and if that callback throws, it gets caught and called again, but this time with its own error
.
For example:
Lines 150 to 160 in 06fb007
node/lib/internal/streams/compose.js
Lines 153 to 161 in 06fb007
- fs: remove IIFE in glob #58418
Some of these bugs might be a
good first issue
Metadata
Metadata
Assignees
Labels
No labels