MCPcopy Create free account
hub / github.com/Noumena-Network/code / _format_error

Function _format_error

src/tools/REPLTool/kernel.py:20–25  ·  view source on GitHub ↗
(error)

Source from the content-addressed store, hash-verified

18
19
20def _format_error(error):
21 if isinstance(error, BaseException):
22 text = "".join(traceback.format_exception_only(type(error), error)).strip()
23 if text:
24 return text
25 return str(error)
26
27
28pending_tool = {}

Callers 1

_handle_execFunction · 0.70

Calls 2

typeFunction · 0.85
strFunction · 0.85

Tested by

no test coverage detected