##// END OF EJS Templates
save traceback for chained exception
Quentin Peter -
Show More
@@ -1409,9 +1409,10 b' class AutoFormattedTB(FormattedTB):'
1409 tb_offset=None, number_of_lines_of_context=5):
1409 tb_offset=None, number_of_lines_of_context=5):
1410 if etype is None:
1410 if etype is None:
1411 etype, value, tb = sys.exc_info()
1411 etype, value, tb = sys.exc_info()
1412 if not isinstance(tb, tuple):
1412 if isinstance(tb, tuple):
1413 # tb is a tuple if this is a chained exception.
1413 # tb is a tuple if this is a chained exception.
1414 # We keep first traceback.
1414 self.tb = tb[0]
1415 else:
1415 self.tb = tb
1416 self.tb = tb
1416 return FormattedTB.structured_traceback(
1417 return FormattedTB.structured_traceback(
1417 self, etype, value, tb, tb_offset, number_of_lines_of_context)
1418 self, etype, value, tb, tb_offset, number_of_lines_of_context)
General Comments 0
You need to be logged in to leave comments. Login now