MCPcopy Create free account
hub / github.com/numpy/numpy / TemplateError

Class TemplateError

tools/npy_tempita/__init__.py:59–75  ·  view source on GitHub ↗

Exception raised while parsing a template

Source from the content-addressed store, hash-verified

57
58
59class TemplateError(Exception):
60 """Exception raised while parsing a template
61 """
62
63 def __init__(self, message, position, name=None):
64 Exception.__init__(self, message)
65 self.position = position
66 self.name = name
67
68 def __str__(self):
69 msg = ' '.join(self.args)
70 if self.position:
71 msg = '%s at line %s column %s' % (
72 msg, self.position[0], self.position[1])
73 if self.name:
74 msg += ' in %s' % self.name
75 return msg
76
77
78class _TemplateContinue(Exception):

Callers 9

_interpret_inheritMethod · 0.85
lexFunction · 0.85
parse_exprFunction · 0.85
parse_condFunction · 0.85
parse_one_condFunction · 0.85
parse_forFunction · 0.85
parse_defaultFunction · 0.85
parse_defFunction · 0.85
parse_signatureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected