##// END OF EJS Templates
fix 'direct cause' message
Quentin Peter -
Show More
@@ -681,15 +681,18 b' class ListTB(TBTools):'
681 exception = self.get_parts_of_chained_exception(evalue)
681 exception = self.get_parts_of_chained_exception(evalue)
682
682
683 if exception and not id(exception[1]) in chained_exc_ids:
683 if exception and not id(exception[1]) in chained_exc_ids:
684 chained_exception_message = self.prepare_chained_exception_message(
685 evalue.__cause__)[0]
684 etype, evalue, etb = exception
686 etype, evalue, etb = exception
685 chained_exc_ids.add(id(exception[1])) # trace exception to avoid infinite 'cause' loop
687 # Trace exception to avoid infinite 'cause' loop
688 chained_exc_ids.add(id(exception[1]))
686 chained_exceptions_tb_offset = 0
689 chained_exceptions_tb_offset = 0
687 out_list = (self.structured_traceback(
690 out_list = (
688 etype, evalue, (etb, chained_exc_ids),
691 self.structured_traceback(
689 chained_exceptions_tb_offset, context)
692 etype, evalue, (etb, chained_exc_ids),
690 + self.prepare_chained_exception_message(
693 chained_exceptions_tb_offset, context)
691 evalue.__cause__)[0]
694 + chained_exception_message
692 + out_list)
695 + out_list)
693
696
694 return out_list
697 return out_list
695
698
General Comments 0
You need to be logged in to leave comments. Login now