VimError: include throwpoint

This is helpful information to have in case of errors.
This commit is contained in:
Daniel Hahler
2020-01-14 09:06:15 +01:00
committed by Dave Halter
parent c0ded0baf2
commit e2abec21c5

View File

@@ -67,7 +67,9 @@ class VimError(Exception):
self.executing = executing
def __str__(self):
return self.message + '; created by: ' + repr(self.executing)
return "{}; created by {!r} (in {})".format(
self.message, self.executing, self.throwpoint
)
def _catch_exception(string, is_eval):