From 90a4bda76bcfc647671f9d8446aecf89a4121273 Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Thu, 20 Nov 2008 13:06:06 +0100 Subject: Catch exceptions from monitors, should fix problems with cpufreq Ignore-this: 175b1d160eaaff1f2f2a2290d514f76e darcs-hash:20081120120606-a5988-a89f879723460fa8691b8a035c667e41d947bfcd.gz --- Plugins/Monitors/Common.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Plugins') 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 -- cgit v1.2.3