summaryrefslogtreecommitdiffstats
path: root/Operations.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-10-12 03:33:05 +0200
committerDavid Roundy <droundy@darcs.net>2007-10-12 03:33:05 +0200
commitd4a3b83436bcc22be93b8084a52a898b952ee94f (patch)
treeb6d41c396f2011264466f9f77652ea6c6fbd269e /Operations.hs
parent89999a17244708953e0fcfe8a64161ef1d064f19 (diff)
downloadmetatile-d4a3b83436bcc22be93b8084a52a898b952ee94f.tar
metatile-d4a3b83436bcc22be93b8084a52a898b952ee94f.zip
catch exceptions when calling user-written code.
This is a minimal approach that only catches error in actual user-written code. darcs-hash:20071012013305-72aca-ab7d36fa77fb3c4fda4abbc7421ba7ba13d9b21a
Diffstat (limited to 'Operations.hs')
-rw-r--r--Operations.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Operations.hs b/Operations.hs
index 03aef7c..d153d43 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -66,7 +66,7 @@ manage w = whenX (fmap not $ isClient w) $ withDisplay $ \d -> do
n <- fmap (fromMaybe "") $ io $ fetchName d w
(ClassHint rn rc) <- io $ getClassHint d w
- g <- manageHook w n rn rc
+ g <- manageHook w n rn rc `catchX` return id
windows (g . f)
-- | unmanage. A window no longer exists, remove it from the window
@@ -169,7 +169,7 @@ windows f = do
whenJust (W.peek ws) $ \w -> io $ setWindowBorder d w fbc
setTopFocus
- logHook
+ logHook `catchX` return ()
-- io performGC -- really helps, but seems to trigger GC bugs?
-- hide every window that was potentially visible before, but is not