log errors on executeFile in restart

I found it difficult to track down a problem in the restart code where xmonad was silently not restarting. This will log the error to stderr, which should show up in .xsession-errors
This commit is contained in:
nickburlett
2007-05-30 17:10:24 +00:00
parent e83ae8ba62
commit fc08bd48b4

View File

@@ -150,7 +150,7 @@ restart mprog resume = do
prog <- maybe (io $ getProgName) return mprog
args <- if resume then gets (("--resume":) . return . show . windowset) else return []
io $ catch (executeFile prog True args Nothing)
(const $ return ()) -- ignore executable not found exception
( (hPutStrLn stderr). show ) -- print executable not found exception
-- | Run a side effecting action with the current workspace. Like 'when' but
whenJust :: Maybe a -> (a -> X ()) -> X ()