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

Class PreprocessorFailure

Tools/c-analyzer/c_parser/preprocessor/errors.py:41–66  ·  view source on GitHub ↗

The preprocessor command failed.

Source from the content-addressed store, hash-verified

39
40
41class PreprocessorFailure(PreprocessorError):
42 """The preprocessor command failed."""
43
44 @classmethod
45 def _msg(cls, error, **ignored):
46 msg = 'preprocessor command failed'
47 if error:
48 msg = f'{msg} {error}'
49 return msg
50
51 def __init__(self, filename, argv, error=None, preprocessor=None):
52 exitcode = -1
53 if isinstance(error, tuple):
54 if len(error) == 2:
55 error, exitcode = error
56 else:
57 error = str(error)
58 if isinstance(error, str):
59 error = error.strip()
60
61 self.argv = _as_tuple(argv) or None
62 self.error = error if error else None
63 self.exitcode = exitcode
64
65 reason = str(self.error)
66 super().__init__(filename, preprocessor, reason)
67
68
69class ErrorDirectiveError(PreprocessorFailure):

Callers 1

convert_errorFunction · 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…