Skip to content

How to handle errors without err callback argument #6

@joliss

Description

@joliss

The following code:

var concat = require('concat-stream')
var through = require('through')

var stream = through().pause()
stream.pipe(concat(function(data) {}))
stream.emit('error')

throws

stream.js:94
      throw er; // Unhandled stream error in pipe.
            ^
undefined

Before d530532, I believe there would have been an err argument to the callback.

It seems a bit surprising to me to have no err argument to the callback. Is there a nice way to handle errors now? Or should we bring the err argument back maybe?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions