Browse Source

Handle exceptions from loading/ignoring extra conf

micbou 8 years ago
parent
commit
deddca8927
1 changed files with 7 additions and 6 deletions
  1. 7 6
      python/ycm/client/base_request.py

+ 7 - 6
python/ycm/client/base_request.py

@@ -215,12 +215,13 @@ def HandleServerException( display = True, truncate = False ):
      response = BaseRequest.PostDataToHandler( ... )
   """
   try:
-    yield
-  except UnknownExtraConf as e:
-    if vimsupport.Confirm( str( e ) ):
-      _LoadExtraConfFile( e.extra_conf_file )
-    else:
-      _IgnoreExtraConfFile( e.extra_conf_file )
+    try:
+      yield
+    except UnknownExtraConf as e:
+      if vimsupport.Confirm( str( e ) ):
+        _LoadExtraConfFile( e.extra_conf_file )
+      else:
+        _IgnoreExtraConfFile( e.extra_conf_file )
   except Exception as e:
     _logger.exception( 'Error while handling server response' )
     if display: