:YcmCompleter<TAB> now won't print traceback

If there's no semantic completer set for the current filetype,
:YcmCompleter<TAB> would print an ugly traceback. Ugh.

Fixes #989.
This commit is contained in:
Strahinja Val Markovic 2014-05-22 14:12:51 -07:00
parent fa47898369
commit 3d733dca2d

View File

@ -196,8 +196,11 @@ class YouCompleteMe( object ):
def GetDefinedSubcommands( self ):
if self._IsServerAlive():
return BaseRequest.PostDataToHandler( BuildRequestData(),
'defined_subcommands' )
try:
return BaseRequest.PostDataToHandler( BuildRequestData(),
'defined_subcommands' )
except ServerError:
return []
else:
return []