handle errors

this allows pipeline sync or async listeners to throw/callback an error, and when so, it stops further iterating and callbacks the error to the `emit()` callback.