File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ exports.onEnd = function(s) {
5050exports . onError = function ( s ) {
5151 return function ( f ) {
5252 return function ( ) {
53- s . on ( 'error' , function ( ) {
54- f ( ) ;
53+ s . on ( 'error' , function ( e ) {
54+ f ( e ) ( ) ;
5555 } ) ;
5656 } ;
5757 } ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import Node.Buffer (Buffer())
3535import Node.Buffer as Buffer
3636
3737import Control.Monad.Eff
38- import Control.Monad.Eff.Exception (throw , EXCEPTION ())
38+ import Control.Monad.Eff.Exception (throw , EXCEPTION (), Error () )
3939import Control.Monad.Eff.Unsafe (unsafeInterleaveEff )
4040
4141-- | A stream.
@@ -106,7 +106,7 @@ foreign import onEnd :: forall w eff. Readable w eff -> Eff eff Unit -> Eff eff
106106foreign import onClose :: forall w eff . Readable w eff -> Eff eff Unit -> Eff eff Unit
107107
108108-- | Listen for `error` events.
109- foreign import onError :: forall w eff . Readable w eff -> Eff eff Unit -> Eff eff Unit
109+ foreign import onError :: forall w eff . Readable w eff -> ( Error -> Eff eff Unit ) -> Eff eff Unit
110110
111111-- | Resume reading from the stream.
112112foreign import resume :: forall w eff . Readable w eff -> Eff eff Unit
You can’t perform that action at this time.
0 commit comments