MCPcopy Index your code
hub / github.com/RustPython/RustPython / format_exc

Function format_exc

Lib/traceback.py:212–214  ·  view source on GitHub ↗

Like print_exc() but return a string.

(limit=None, chain=True)

Source from the content-addressed store, hash-verified

210 print_exception(sys.exception(), limit=limit, file=file, chain=chain)
211
212def format_exc(limit=None, chain=True):
213 """Like print_exc() but return a string."""
214 return "".join(format_exception(sys.exception(), limit=limit, chain=chain))
215
216def print_last(limit=None, file=None, chain=True):
217 """This is a shorthand for 'print_exception(sys.last_exc, limit=limit, file=file, chain=chain)'."""

Callers 2

_handle_requestMethod · 0.90
serve_clientMethod · 0.90

Calls 3

format_exceptionFunction · 0.85
joinMethod · 0.45
exceptionMethod · 0.45

Tested by

no test coverage detected