From 000209c13299f1c046dc60e3649c17e9520680de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Thu, 13 Oct 2022 21:05:31 +0200 Subject: Fail test and start gdb session immediately on process crash --- src/Process.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Process.hs') 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 -- cgit v1.2.3