summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@ing.unitn.it>2010-02-09 11:42:36 +0100
committerAndrea Rossato <andrea.rossato@ing.unitn.it>2010-02-09 11:42:36 +0100
commitcf8e1071ac4bb0c829f6fa018c88df514def1d69 (patch)
tree74b7622e3e2d3c09c05440f740406b4cd05d3235
parent35714ccbb7b64f28ba38d67dca9cfdffde2d21f3 (diff)
downloadxmobar-cf8e1071ac4bb0c829f6fa018c88df514def1d69.tar.gz
xmobar-cf8e1071ac4bb0c829f6fa018c88df514def1d69.tar.bz2
Monitors: display exceptions
Ignore-this: 46f86b3dcf9f41ec35a904e97e96013a656b08d5 darcs-hash:20100209104236-d6583-4f1dbcb4d0ab702c742e73677a955d9f600a1d61.gz
-rw-r--r--Plugins/Monitors/Common.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Plugins/Monitors/Common.hs b/Plugins/Monitors/Common.hs
index caf2e98..46543e1 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -151,7 +151,8 @@ runM args conf action r cb = do go
where go = do
c <- conf
let ac = doArgs args action
- s <- handle (\x -> const (return "error") $ x `asTypeOf` (undefined::SomeException)) $ runReaderT ac c
+ he = return . (++) "error: " . show . flip asTypeOf (undefined::SomeException)
+ s <- handle he $ runReaderT ac c
cb s
tenthSeconds r
go