MCPcopy Create free account
hub / github.com/conda/constructor / UnableToParse

Class UnableToParse

constructor/exceptions.py:19–46  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17
18
19class UnableToParse(YamlParsingError):
20 def __init__(self, original, *args, **kwargs):
21 super().__init__(*args, **kwargs)
22 self.original = original
23
24 def error_msg(self):
25 return "\n".join(
26 [
27 SEPARATOR,
28 self.error_body(),
29 self.indented_exception(),
30 ]
31 )
32
33 def error_body(self):
34 return "\n".join(
35 [
36 "Unable to parse meta.yaml file\n",
37 ]
38 )
39
40 def indented_exception(self):
41 orig = str(self.original)
42
43 def indent(s):
44 return s.replace("\n", "\n--> ")
45
46 return f"Error Message:\n--> {indent(orig)}\n\n"
47
48
49class UnableToParseMissingJinja2(UnableToParse):

Callers 3

renderFunction · 0.90
render_templateFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected