diff options
author | Will Thompson <will@willthompson.co.uk> | 2012-01-23 09:15:40 +0000 |
---|---|---|
committer | Will Thompson <will@willthompson.co.uk> | 2012-01-23 09:17:44 +0000 |
commit | d9d201aad85762509073a4ceb38dc3d1c3b8ecb9 (patch) | |
tree | 6573a3881cf94320c9b72817a088264c82714751 | |
parent | e0200367c6134db99d391de0f19ccf321aa68a96 (diff) |
uiMain: show uncaught GErrors more helpfully
For some reason, uncaught GErrors just get printed to the terminal as:
bustle: <<System.Glib.GError.GError>>
Rethrowing them as normal exceptions gets us more useful output when the
world has ended.
-rw-r--r-- | Bustle/UI.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Bustle/UI.hs b/Bustle/UI.hs index 874151a..e557019 100644 --- a/Bustle/UI.hs +++ b/Bustle/UI.hs @@ -51,7 +51,7 @@ import Bustle.UI.Util (displayError) import Bustle.StatisticsPane import Bustle.Loader -import System.Glib.GError (GError(..), catchGError) +import System.Glib.GError (GError(..), catchGError, failOnGError) import Graphics.UI.Gtk @@ -116,7 +116,7 @@ decWindows :: B Int decWindows = modifyWindows (subtract 1) >> gets windows uiMain :: IO () -uiMain = do +uiMain = failOnGError $ do args <- initGUI -- FIXME: get a real option parser |