mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-11 02:01:51 -07:00
fix potential hole in userCode.
This makes userCode catch errors even when the user does something like (return undefined).
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user