-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.
Description
It is tempting to do something like this:
var error = new Error('some error');
stream
.pipe(through(function(chunk) {
throw error ;
}))
.on('error', function(err) {
assert.equal(error, err);
});For me because in promise throwing an exception equals rejection.
The docs should tell what really happens when exceptions are thrown in these kind of functions (_read, _write, _writev, _transform, _flush).
Metadata
Metadata
Assignees
Labels
docIssues and PRs related to the documentations.Issues and PRs related to the documentations.streamIssues and PRs related to the stream subsystem.Issues and PRs related to the stream subsystem.