From cf8e1071ac4bb0c829f6fa018c88df514def1d69 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Tue, 9 Feb 2010 11:42:36 +0100 Subject: Monitors: display exceptions Ignore-this: 46f86b3dcf9f41ec35a904e97e96013a656b08d5 darcs-hash:20100209104236-d6583-4f1dbcb4d0ab702c742e73677a955d9f600a1d61.gz --- Plugins/Monitors/Common.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3