rafa
Version:
Rafa.js is a Javascript framework for building concurrent applications.
19 lines (13 loc) • 393 B
Markdown
Return a new child stream that handles all errors that pass
through the stream. Return values from the handler function have to affect
on values sent to child streams (cannot be transformed).
<aside>
```js
// # error(unit: A => undefined): Stream
var stream = Rafa.stream();
var error = null;
stream.error(e => error = e.message);
stream.write(new Error(23));
// error: 23;
```
</aside>