##// END OF EJS Templates
Avoid recursive loop
Quentin Peter -
Show More
@@ -653,8 +653,10 b' class ListTB(TBTools):'
653 -------
653 -------
654 String with formatted exception.
654 String with formatted exception.
655 """
655 """
656 # if chained_exc_ids is None:
656 if isinstance(etb, tuple):
657 chained_exc_ids = set()
657 etb, chained_exc_ids = etb
658 else:
659 chained_exc_ids = set()
658 if isinstance(etb, list):
660 if isinstance(etb, list):
659 elist = etb
661 elist = etb
660 elif etb is not None:
662 elif etb is not None:
@@ -683,7 +685,8 b' class ListTB(TBTools):'
683 chained_exc_ids.add(id(exception[1])) # trace exception to avoid infinite 'cause' loop
685 chained_exc_ids.add(id(exception[1])) # trace exception to avoid infinite 'cause' loop
684 chained_exceptions_tb_offset = 0
686 chained_exceptions_tb_offset = 0
685 out_list = (self.structured_traceback(
687 out_list = (self.structured_traceback(
686 etype, evalue, etb, chained_exceptions_tb_offset, context)
688 etype, evalue, (etb, chained_exc_ids),
689 chained_exceptions_tb_offset, context)
687 + self.prepare_chained_exception_message(
690 + self.prepare_chained_exception_message(
688 evalue.__cause__)[0]
691 evalue.__cause__)[0]
689 + out_list)
692 + out_list)
General Comments 0
You need to be logged in to leave comments. Login now