Ignoring the new "already being parsed" message
This exception comes from ycmd and is not something the user can do anything about, so let's rather not show it.
This commit is contained in:
parent
995e6be437
commit
2fafab88c4
@ -163,6 +163,16 @@ def JsonFromFuture( future ):
|
||||
return None
|
||||
|
||||
|
||||
def HandleServerException( exception ):
|
||||
serialized_exception = str( exception )
|
||||
|
||||
# We ignore the exception about the file already being parsed since it comes
|
||||
# up often and isn't something that's actionable by the user.
|
||||
if 'already being parsed' in serialized_exception:
|
||||
return
|
||||
vimsupport.PostVimMessage( serialized_exception )
|
||||
|
||||
|
||||
def _ValidateResponseObject( response ):
|
||||
if not utils.ContentHexHmacValid(
|
||||
response.content,
|
||||
|
@ -17,9 +17,9 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with YouCompleteMe. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
from ycm import vimsupport
|
||||
from ycmd.utils import ToUtf8IfNeeded
|
||||
from ycm.client.base_request import BaseRequest, JsonFromFuture
|
||||
from ycm.client.base_request import ( BaseRequest, JsonFromFuture,
|
||||
HandleServerException )
|
||||
|
||||
TIMEOUT_SECONDS = 0.5
|
||||
|
||||
@ -46,7 +46,7 @@ class CompletionRequest( BaseRequest ):
|
||||
return _ConvertCompletionResponseToVimDatas(
|
||||
JsonFromFuture( self._response_future ) )
|
||||
except Exception as e:
|
||||
vimsupport.PostVimMessage( str( e ) )
|
||||
HandleServerException( e )
|
||||
return []
|
||||
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
||||
from ycm import vimsupport
|
||||
from ycmd.responses import UnknownExtraConf
|
||||
from ycm.client.base_request import ( BaseRequest, BuildRequestData,
|
||||
JsonFromFuture )
|
||||
JsonFromFuture, HandleServerException )
|
||||
|
||||
|
||||
class EventNotification( BaseRequest ):
|
||||
@ -61,7 +61,7 @@ class EventNotification( BaseRequest ):
|
||||
else:
|
||||
_IgnoreExtraConfFile( e.extra_conf_file )
|
||||
except Exception as e:
|
||||
vimsupport.PostVimMessage( str( e ) )
|
||||
HandleServerException( e )
|
||||
|
||||
return self._cached_response if self._cached_response else []
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user