From e9cc80873498ba63469f9730d79846e5944aba06 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 25 Jan 2016 18:26:14 +0000 Subject: did some thinking on exception handling --- server/src/Thermoprint/Server/Printer.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/Thermoprint/Server/Printer.hs b/server/src/Thermoprint/Server/Printer.hs index 5b1b7b0..55bfabc 100644 --- a/server/src/Thermoprint/Server/Printer.hs +++ b/server/src/Thermoprint/Server/Printer.hs @@ -92,7 +92,7 @@ runPrinter Printer{..} = forever $ do Nothing -> $(logWarn) "Nonexistent job id in printer queue" Just job -> do $(logInfo) . T.pack $ "Printing " ++ show (unSqlBackendKey . unJobKey $ jobId) - printReturn <- (unPM print) (jobContent job) + printReturn <- (unPM print) (jobContent job) -- We could, at this point, do some exception handling. It was decided that this would be undesirable, because we really don't have any idea what exceptions to catch maybe (return ()) ($(logWarn) . T.pack . (("Error while printing " ++ show (unSqlBackendKey . unJobKey $ jobId) ++ ": ") ++) . show) $ printReturn atomically' $ modifyTVar' queue (\Queue{..} -> force . Queue pending Nothing $ (jobId, printReturn) <| history) -- cgit v1.2.3