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) {
50
50
exports . onError = function ( s ) {
51
51
return function ( f ) {
52
52
return function ( ) {
53
- s . on ( 'error' , function ( ) {
54
- f ( ) ;
53
+ s . on ( 'error' , function ( e ) {
54
+ f ( e ) ( ) ;
55
55
} ) ;
56
56
} ;
57
57
} ;
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ import Node.Buffer (Buffer())
35
35
import Node.Buffer as Buffer
36
36
37
37
import Control.Monad.Eff
38
- import Control.Monad.Eff.Exception (throw , EXCEPTION ())
38
+ import Control.Monad.Eff.Exception (throw , EXCEPTION (), Error () )
39
39
import Control.Monad.Eff.Unsafe (unsafeInterleaveEff )
40
40
41
41
-- | A stream.
@@ -106,7 +106,7 @@ foreign import onEnd :: forall w eff. Readable w eff -> Eff eff Unit -> Eff eff
106
106
foreign import onClose :: forall w eff . Readable w eff -> Eff eff Unit -> Eff eff Unit
107
107
108
108
-- | 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
110
110
111
111
-- | Resume reading from the stream.
112
112
foreign import resume :: forall w eff . Readable w eff -> Eff eff Unit
You can’t perform that action at this time.
0 commit comments