From b162d2e23a500bb362aaf2b94d8d3ee8f3651163 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Smr=C5=BE?= Date: Mon, 6 Jul 2026 12:02:29 +0200 Subject: Print exception cought in the run loop --- src/Command/Run.hs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/Command/Run.hs') diff --git a/src/Command/Run.hs b/src/Command/Run.hs index 63d1254..34a32d6 100644 --- a/src/Command/Run.hs +++ b/src/Command/Run.hs @@ -410,7 +410,14 @@ cmdRun (RunCommand RunOptions {..} args) = do outputEvent output $ LogMessage $ "Jobset failed: " <> shortCid <> " " <> T.pack err loop names (Just ( rest, next )) - handle @SomeException (\_ -> cancelAllJobs mngr) $ do + handle @SomeException + (\e -> do + if | Just UserInterrupt <- fromException e + -> outputEvent output RunInterruptedByUser + | otherwise + -> outputMessage output $ "exception in run loop: " <> T.pack (show e) + cancelAllJobs mngr + ) $ do loop [] =<< atomically (takeJobSource source) waitForJobs waitForJobs -- cgit v1.2.3