MCPcopy Index your code
hub / github.com/python/cpython / showtraceback

Method showtraceback

Lib/code.py:118–130  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 1

runcodeMethod · 0.95

Calls 1

_showtracebackMethod · 0.95

Tested by

no test coverage detected