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

Class ExecutionFailed

Lib/concurrent/interpreters/__init__.py:35–60  ·  view source on GitHub ↗

An unhandled exception happened during execution. This is raised from Interpreter.exec() and Interpreter.call().

Source from the content-addressed store, hash-verified

33""".strip()
34
35class ExecutionFailed(InterpreterError):
36 """An unhandled exception happened during execution.
37
38 This is raised from Interpreter.exec() and Interpreter.call().
39 """
40
41 def __init__(self, excinfo):
42 msg = excinfo.formatted
43 if not msg:
44 if excinfo.type and excinfo.msg:
45 msg = f'{excinfo.type.__name__}: {excinfo.msg}'
46 else:
47 msg = excinfo.type.__name__ or excinfo.msg
48 super().__init__(msg)
49 self.excinfo = excinfo
50
51 def __str__(self):
52 try:
53 formatted = self.excinfo.errdisplay
54 except Exception:
55 return super().__str__()
56 else:
57 return _EXEC_FAILURE_STR.format(
58 superstr=super().__str__(),
59 formatted=formatted,
60 )
61
62
63def create():

Callers 2

execMethod · 0.85
_callMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…