| 1300 | chain: Sequence[tuple[ReprTraceback, ReprFileLocation | None, str | None]] |
| 1301 | |
| 1302 | def __init__( |
| 1303 | self, |
| 1304 | chain: Sequence[tuple[ReprTraceback, ReprFileLocation | None, str | None]], |
| 1305 | ) -> None: |
| 1306 | # reprcrash and reprtraceback of the outermost (the newest) exception |
| 1307 | # in the chain. |
| 1308 | super().__init__( |
| 1309 | reprtraceback=chain[-1][0], |
| 1310 | reprcrash=chain[-1][1], |
| 1311 | ) |
| 1312 | self.chain = chain |
| 1313 | |
| 1314 | def toterminal(self, tw: TerminalWriter) -> None: |
| 1315 | for reprtraceback, reprcrash, description in self.chain: |