Display the exception that just occurred. We remove the first stack item because it is our own code. The output is written by self.write(), below.
(self)
| 116 | typ = value = tb = None |
| 117 | |
| 118 | def showtraceback(self): |
| 119 | """Display the exception that just occurred. |
| 120 | |
| 121 | We remove the first stack item because it is our own code. |
| 122 | |
| 123 | The output is written by self.write(), below. |
| 124 | |
| 125 | """ |
| 126 | try: |
| 127 | typ, value, tb = sys.exc_info() |
| 128 | self._showtraceback(typ, value, tb.tb_next, "") |
| 129 | finally: |
| 130 | typ = value = tb = None |
| 131 | |
| 132 | def _showtraceback(self, typ, value, tb, source): |
| 133 | sys.last_type = typ |