Package Exports
- bubble-stream-error
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (bubble-stream-error) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
bubble-stream-error
Node module for bubbling errors from 'sub-streams' to a master stream.
examples
This is what you would normally do:
randomStream.pipe(colorizeStream).pipe(choppedStream).pipe(finalStream);
// assign an error handler on each stream
[randomStream, colorizeStream, choppedStream, finalStream].forEach(function(stream) {
stream.on('error', function handleError(err) {
// ...
});
});
With bubble-stream-error
:
var bubbleError = require('bubble-stream-error');
// ...
bubbleError(randomStream, colorizeStream, choppedStream, finalStream);
randomStream.pipe(colorizeStream).pipe(choppedStream).pipe(finalStream);
// assign a single error handler instead of 4
finalStream.on('error', function handleAllStreamErrors(err) {
// ...
});
tests
npm test