(self, etype, value, tb, tb_offset=None, number_of_lines_of_context=5)
| 1328 | self.set_mode(mode) |
| 1329 | |
| 1330 | def structured_traceback(self, etype, value, tb, tb_offset=None, number_of_lines_of_context=5): |
| 1331 | tb_offset = self.tb_offset if tb_offset is None else tb_offset |
| 1332 | mode = self.mode |
| 1333 | if mode in self.verbose_modes: |
| 1334 | # Verbose modes need a full traceback |
| 1335 | return VerboseTB.structured_traceback( |
| 1336 | self, etype, value, tb, tb_offset, number_of_lines_of_context |
| 1337 | ) |
| 1338 | elif mode == 'Minimal': |
| 1339 | return ListTB.get_exception_only(self, etype, value) |
| 1340 | else: |
| 1341 | # We must check the source cache because otherwise we can print |
| 1342 | # out-of-date source code. |
| 1343 | self.check_cache() |
| 1344 | # Now we can extract and format the exception |
| 1345 | return ListTB.structured_traceback( |
| 1346 | self, etype, value, tb, tb_offset, number_of_lines_of_context |
| 1347 | ) |
| 1348 | |
| 1349 | def stb2text(self, stb): |
| 1350 | """Convert a structured traceback (a list) to a string.""" |
nothing calls this directly
no test coverage detected