summaryrefslogtreecommitdiffhomepage
path: root/Plugins
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2008-11-20 13:06:06 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2008-11-20 13:06:06 +0100
commit90a4bda76bcfc647671f9d8446aecf89a4121273 (patch)
treed115df46b3aacd81cac0c1af79d916d85fa7b3b6 /Plugins
parentde2d739902f4539ac4de10d3a9799124c6831559 (diff)
downloadxmobar-90a4bda76bcfc647671f9d8446aecf89a4121273.tar.gz
xmobar-90a4bda76bcfc647671f9d8446aecf89a4121273.tar.bz2
Catch exceptions from monitors, should fix problems with cpufreq
Ignore-this: 175b1d160eaaff1f2f2a2290d514f76e darcs-hash:20081120120606-a5988-a89f879723460fa8691b8a035c667e41d947bfcd.gz
Diffstat (limited to 'Plugins')
-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 d6066d6..03b40d8 100644
--- a/Plugins/Monitors/Common.hs
+++ b/Plugins/Monitors/Common.hs
@@ -55,6 +55,7 @@ import Data.List
import Numeric
import Text.ParserCombinators.Parsec
import System.Console.GetOpt
+import Control.Exception (handle)
import Plugins
-- $monitor
@@ -148,7 +149,7 @@ runM args conf action r cb = do go
where go = do
c <- conf
let ac = doArgs args action
- s <- runReaderT ac c
+ s <- handle (const $ return "error") $ runReaderT ac c
cb s
tenthSeconds r
go