summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorDavid Roundy <droundy@darcs.net>2007-10-12 17:02:53 +0200
committerDavid Roundy <droundy@darcs.net>2007-10-12 17:02:53 +0200
commit09b72be6e576610a74f82e8e8caf2c0abdbb337a (patch)
treec91cf338556774dfdddd76420d2f163c1556c60f /XMonad.hs
parent22ccc4dd0c0d8194b19e074e55cd6400e302ddb6 (diff)
downloadmetatile-09b72be6e576610a74f82e8e8caf2c0abdbb337a.tar
metatile-09b72be6e576610a74f82e8e8caf2c0abdbb337a.zip
fix potential hole in userCode.
This makes userCode catch errors even when the user does something like (return undefined). darcs-hash:20071012150253-72aca-72e3ecd20cdc827ee342dc4ebceecf33142d9dd5
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/XMonad.hs b/XMonad.hs
index cf72908..501e684 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -98,7 +98,7 @@ catchX (X job) (X errcase) = do
-- | Execute the argument, catching all exceptions. Either this function or
-- catchX should be used at all callsites of user customized code.
userCode :: X () -> X ()
-userCode a = catchX a (return ())
+userCode a = catchX (a >> return ()) (return ())
-- ---------------------------------------------------------------------
-- Convenient wrappers to state