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

Method _format_exc

Lib/pdb.py:2592–2593  ·  view source on GitHub ↗
(self, exc: BaseException)

Source from the content-addressed store, hash-verified

2590 self.run(target.code)
2591
2592 def _format_exc(self, exc: BaseException):
2593 return traceback.format_exception_only(exc)[-1].strip()
2594
2595 def _compile_error_message(self, expr):
2596 """Return the error message as string if compiling `expr` fails."""

Callers 5

user_exceptionMethod · 0.95
_getval_exceptMethod · 0.95
_error_excMethod · 0.95
_safe_reprMethod · 0.95

Calls 2

format_exception_onlyMethod · 0.80
stripMethod · 0.45

Tested by

no test coverage detected