From 91368c09ea56f5a658635c0cf1189bc5b698da5c Mon Sep 17 00:00:00 2001 From: Strahinja Val Markovic Date: Sat, 4 Jan 2014 16:17:44 -0800 Subject: [PATCH] Handling vim.error from omnifunc If the omnifunc encounters a syntax error, we need to handle this without showing a traceback to the user. --- python/ycm/completers/all/omni_completer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ycm/completers/all/omni_completer.py b/python/ycm/completers/all/omni_completer.py index 5bfffeff..eb405d57 100644 --- a/python/ycm/completers/all/omni_completer.py +++ b/python/ycm/completers/all/omni_completer.py @@ -95,7 +95,7 @@ class OmniCompleter( Completer ): raise TypeError( OMNIFUNC_NOT_LIST ) return filter( bool, items ) - except ( TypeError, ValueError ) as error: + except ( TypeError, ValueError, vim.error ) as error: vimsupport.PostVimMessage( OMNIFUNC_RETURNED_BAD_VALUE + ' ' + str( error ) ) return []