summaryrefslogtreecommitdiff
path: root/src/Process.hs
diff options
context:
space:
mode:
authorRoman Smrž <roman.smrz@seznam.cz>2022-10-13 21:05:31 +0200
committerRoman Smrž <roman.smrz@seznam.cz>2022-10-13 22:16:06 +0200
commit000209c13299f1c046dc60e3649c17e9520680de (patch)
treed0ef2db73b3ed95559cec6037348e03706b116f0 /src/Process.hs
parented4dcb61f8a13a3cbfee1c30ea2cb12b5fd3c1ec (diff)
Fail test and start gdb session immediately on process crash
Diffstat (limited to 'src/Process.hs')
-rw-r--r--src/Process.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Process.hs b/src/Process.hs
index 0a2c861..153eb2b 100644
--- a/src/Process.hs
+++ b/src/Process.hs
@@ -68,7 +68,7 @@ send p line = liftIO $ do
outProc :: MonadOutput m => OutputType -> Process -> Text -> m ()
outProc otype p line = outLine otype (textProcName $ procName p) line
-closeProcess :: (MonadIO m, MonadOutput m, MonadError () m) => Process -> m ()
+closeProcess :: (MonadIO m, MonadOutput m, MonadError Failed m) => Process -> m ()
closeProcess p = do
liftIO $ hClose $ procStdin p
case procKillWith p of
@@ -81,4 +81,4 @@ closeProcess p = do
ExitSuccess -> return ()
ExitFailure code -> do
outProc OutputChildFail p $ T.pack $ "exit code: " ++ show code
- throwError ()
+ throwError Failed