Show More
@@ -1094,12 +1094,14 b' class VerboseTB(TBTools):' | |||||
1094 | etype, evalue, etb = exception |
|
1094 | etype, evalue, etb = exception | |
1095 | else: |
|
1095 | else: | |
1096 | evalue = None |
|
1096 | evalue = None | |
|
1097 | chained_exc_ids = set() | |||
1097 | while evalue: |
|
1098 | while evalue: | |
1098 | formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context, |
|
1099 | formatted_exceptions += self.format_exception_as_a_whole(etype, evalue, etb, lines_of_context, | |
1099 | chained_exceptions_tb_offset) |
|
1100 | chained_exceptions_tb_offset) | |
1100 | exception = self.get_parts_of_chained_exception(evalue) |
|
1101 | exception = self.get_parts_of_chained_exception(evalue) | |
1101 |
|
1102 | |||
1102 | if exception: |
|
1103 | if exception and not id(exception[1]) in chained_exc_ids: | |
|
1104 | chained_exc_ids.add(id(exception[1])) # trace exception to avoid infinite 'cause' loop | |||
1103 | formatted_exceptions += self.prepare_chained_exception_message(evalue.__cause__) |
|
1105 | formatted_exceptions += self.prepare_chained_exception_message(evalue.__cause__) | |
1104 | etype, evalue, etb = exception |
|
1106 | etype, evalue, etb = exception | |
1105 | else: |
|
1107 | else: |
General Comments 0
You need to be logged in to leave comments.
Login now