tbutils: add get_formatted_exception_only method

This commit is contained in:
Mahmoud Hashemi 2016-06-11 16:07:34 -07:00
parent c9f4538ebe
commit e93e03f2ae
1 changed files with 3 additions and 0 deletions

View File

@ -409,6 +409,9 @@ class ExceptionInfo(object):
tb_str = self.tb_info.get_formatted()
return ''.join([tb_str, '%s: %s' % (self.exc_type, self.exc_msg)])
def get_formatted_exception_only(self):
return '%s: %s' % (self.exc_type, self.exc_msg)
class ContextualCallpoint(Callpoint):
"""The ContextualCallpoint is a :class:`Callpoint` subtype with the