From 7374d223cc41453b2b13f01e7be1d01d4a536969 Mon Sep 17 00:00:00 2001 From: Andrea Rossato Date: Fri, 26 Oct 2007 23:18:59 +0200 Subject: XPrompt: catch exceptions when running the completion function darcs-hash:20071026211859-32816-b161b40ed1ba2fcca8c32f85fc2de821f10c2fe6.gz --- XPrompt.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/XPrompt.hs b/XPrompt.hs index 51d8756..88ff943 100644 --- a/XPrompt.hs +++ b/XPrompt.hs @@ -446,7 +446,8 @@ printPrompt drw = do getCompletions :: XP [String] getCompletions = do s <- get - io $ (completionFunction s) (getLastWord $ command s) + io $ ((completionFunction s) (getLastWord $ command s) + `catch` \_ -> return []) setComplWin :: Window -> ComplWindowDim -> XP () setComplWin w wi = -- cgit v1.2.3