VimError: set self.message

`self.message` is used in `__str__`.

Without this, tracebacks end like this:

    Traceback (most recent call last):
    [...]
      File "…/vim/neobundles/jedi/jedi_vim.py", line 87, in _catch_
    exception
        raise VimError(result['exception'], result['throwpoint'], string)
    jedi_vim.VimError: <unprintable VimError object>
This commit is contained in:
Daniel Hahler
2015-05-02 11:51:27 +02:00
parent e5038cc9fa
commit 676c558110

View File

@@ -68,6 +68,7 @@ def _check_jedi_availability(show_error=False):
class VimError(Exception):
def __init__(self, message, throwpoint, executing):
super(type(self), self).__init__(message)
self.message = message
self.throwpoint = throwpoint
self.executing = executing