File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ module Node.ChildProcess
1111 , send
1212 , disconnect
1313 , Error ()
14+ , toStandardError
1415 , Exit (..)
1516 , onExit
1617 , onClose
@@ -32,6 +33,7 @@ import Prelude
3233import Control.Alt ((<|>))
3334import Control.Bind ((>=>))
3435import Control.Monad.Eff (Eff ())
36+ import Control.Monad.Eff.Exception as Exception
3537import Control.Monad.Eff.Exception.Unsafe (unsafeThrow )
3638
3739import Data.StrMap (StrMap ())
@@ -212,6 +214,11 @@ type Error =
212214 , syscall :: String
213215 }
214216
217+ -- | Convert a ChildProcess.Error to a standard Error, which can then be thrown
218+ -- | inside an Eff or Aff computation (for example).
219+ toStandardError :: Error -> Exception.Error
220+ toStandardError = unsafeCoerce
221+
215222-- | Behaviour for standard IO streams (eg, standard input, standard output) of
216223-- | a child process.
217224-- |
You can’t perform that action at this time.
0 commit comments