diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-14 22:27:57 +0000 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-02-14 22:27:57 +0000 |
commit | 1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a (patch) | |
tree | a79f4689157fdd781154efde9eba809865c03c03 /server | |
parent | 0609858031013f9d95f8104739811d6413331e9b (diff) | |
download | thermoprint-1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a.tar thermoprint-1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a.tar.gz thermoprint-1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a.tar.bz2 thermoprint-1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a.tar.xz thermoprint-1276f480bb931f6b82e5c8f35e535e3b5eb2bd7a.zip |
Handle PrintingErrors
Diffstat (limited to 'server')
-rw-r--r-- | server/src/Thermoprint/Server/Printer/Generic.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/server/src/Thermoprint/Server/Printer/Generic.hs b/server/src/Thermoprint/Server/Printer/Generic.hs index bf6ce3b..33172ef 100644 --- a/server/src/Thermoprint/Server/Printer/Generic.hs +++ b/server/src/Thermoprint/Server/Printer/Generic.hs | |||
@@ -58,6 +58,7 @@ genericPrint path = PM $ flip catches handlers . withLockedFile path . print | |||
58 | print printout handle = liftIO $ runReaderT (bracket_ initialize (render printout) finalize) handle >> return Nothing | 58 | print printout handle = liftIO $ runReaderT (bracket_ initialize (render printout) finalize) handle >> return Nothing |
59 | handlers = [ Handler $ return . Just . IOError . (show :: IOException -> String) | 59 | handlers = [ Handler $ return . Just . IOError . (show :: IOException -> String) |
60 | , Handler $ return . Just . EncError | 60 | , Handler $ return . Just . EncError |
61 | , Handler $ return . Just | ||
61 | ] | 62 | ] |
62 | 63 | ||
63 | type Render = ReaderT Handle IO () | 64 | type Render = ReaderT Handle IO () |