From: Daniel W. <dm...@lu...> - 2012-07-08 09:49:36
|
diffing dir... Sun Jul 8 10:43:22 BST 2012 Daniel Wagner <da...@wa...> * Gergely Risko's patch to make tryEvent more useful Ignore-this: 526940ab1b2222de547f24dce4d95db4 Previously, tryEvent would catch pattern-match failure exceptions and Do The Right Thing. However, it didn't catch the exception thrown when calling "guard". This patch lets it behave the same when guards fail as when patterns are exhausted. hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 642 --- threw a pattern match exception. +-- threw a pattern match exception or calls mzero (e.g. via guard). hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 649 - , Handler (\ e -> if isUserError e && "Pattern" `isPrefixOf` ioeGetErrorString e + , Handler (\ e -> if isUserError e && + ("Pattern" `isPrefixOf` ioeGetErrorString e || + "mzero" == ioeGetErrorString e) hunk ./gtk/Graphics/UI/Gtk/Gdk/EventM.hsc 659 + | "user error (mzero" `isPrefixOf` show e -> + return False |