mirror of
https://github.com/xmonad/xmonad.git
synced 2025-08-11 10:11:52 -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
|
-- | Execute the argument, catching all exceptions. Either this function or
|
||||||
-- catchX should be used at all callsites of user customized code.
|
-- catchX should be used at all callsites of user customized code.
|
||||||
userCode :: X () -> X ()
|
userCode :: X () -> X ()
|
||||||
userCode a = catchX a (return ())
|
userCode a = catchX (a >> return ()) (return ())
|
||||||
|
|
||||||
-- ---------------------------------------------------------------------
|
-- ---------------------------------------------------------------------
|
||||||
-- Convenient wrappers to state
|
-- Convenient wrappers to state
|
||||||
|
Reference in New Issue
Block a user