MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / print_last

Function print_last

tools/python-3.11.9-amd64/Lib/traceback.py:186–192  ·  view source on GitHub ↗

This is a shorthand for 'print_exception(sys.last_type, sys.last_value, sys.last_traceback, limit, file)'.

(limit=None, file=None, chain=True)

Source from the content-addressed store, hash-verified

184 return "".join(format_exception(*sys.exc_info(), limit=limit, chain=chain))
185
186def print_last(limit=None, file=None, chain=True):
187 """This is a shorthand for 'print_exception(sys.last_type,
188 sys.last_value, sys.last_traceback, limit, file)'."""
189 if not hasattr(sys, "last_type"):
190 raise ValueError("no last exception")
191 print_exception(sys.last_type, sys.last_value, sys.last_traceback,
192 limit, file, chain)
193
194#
195# Printing and Extracting Stacks.

Callers

nothing calls this directly

Calls 1

print_exceptionFunction · 0.70

Tested by

no test coverage detected