Format and return the specified exception information as a string. This default implementation just uses traceback.print_exception()
(self, ei)
| 656 | return s |
| 657 | |
| 658 | def formatException(self, ei): |
| 659 | """ |
| 660 | Format and return the specified exception information as a string. |
| 661 | |
| 662 | This default implementation just uses |
| 663 | traceback.print_exception() |
| 664 | """ |
| 665 | sio = io.StringIO() |
| 666 | tb = ei[2] |
| 667 | # See issues #9427, #1553375. Commented out for now. |
| 668 | #if getattr(self, 'fullstack', False): |
| 669 | # traceback.print_stack(tb.tb_frame.f_back, file=sio) |
| 670 | traceback.print_exception(ei[0], ei[1], tb, limit=None, file=sio) |
| 671 | s = sio.getvalue() |
| 672 | sio.close() |
| 673 | if s[-1:] == "\n": |
| 674 | s = s[:-1] |
| 675 | return s |
| 676 | |
| 677 | def usesTime(self): |
| 678 | """ |