From 9efe2e5f60c819bbc4405933fda855e86db71203 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Thu, 24 Dec 2015 05:52:46 +0100 Subject: [PATCH] GUI: improve error handling in urlGoTo --- src/GUI/Gtk/Callbacks.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/GUI/Gtk/Callbacks.hs b/src/GUI/Gtk/Callbacks.hs index b638746..32c74e1 100644 --- a/src/GUI/Gtk/Callbacks.hs +++ b/src/GUI/Gtk/Callbacks.hs @@ -99,7 +99,7 @@ setCallbacks mygui myview = do -- |Go to the url given at the 'urlBar' and visualize it in the given -- treeView. urlGoTo :: MyGUI -> MyView -> IO () -urlGoTo mygui myview = do +urlGoTo mygui myview = withErrorDialog $ do fp <- entryGetText (urlBar mygui) let abs = isAbsolute fp exists <- (||) <$> doesDirectoryExist fp <*> doesFileExist fp