format_value: catch BaseException

Ref: https://github.com/Qix-/better-exceptions/issues/85#issuecomment-489930136
This commit is contained in:
Daniel Hahler 2019-05-07 08:45:14 +02:00
parent 1c82a8f8e5
commit 02b0b51dcf

View File

@ -115,7 +115,9 @@ class ExceptionFormatter(object):
def format_value(self, v):
try:
v = repr(v)
except Exception:
except KeyboardInterrupt:
raise
except BaseException:
v = u'<unprintable %s object>' % type(v).__name__
max_length = self._max_length