MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / showtraceback

Method showtraceback

pydevconsole.py:523–539  ·  view source on GitHub ↗

Display the exception that just occurred.

(self, *args, **kwargs)

Source from the content-addressed store, hash-verified

521 sys.stderr.write("".join(list))
522
523 def showtraceback(self, *args, **kwargs):
524 """Display the exception that just occurred."""
525 # Override for avoid using sys.excepthook PY-12600
526 try:
527 type, value, tb = sys.exc_info()
528 sys.last_type = type
529 sys.last_value = value
530 sys.last_traceback = tb
531 tblist = traceback.extract_tb(tb)
532 del tblist[:1]
533 lines = traceback.format_list(tblist)
534 if lines:
535 lines.insert(0, "Traceback (most recent call last):\n")
536 lines.extend(traceback.format_exception_only(type, value))
537 finally:
538 tblist = tb = None
539 sys.stderr.write("".join(lines))
540
541
542def console_exec(thread_id, frame_id, expression, dbg):

Callers 1

console_execFunction · 0.95

Calls 2

writeMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected