MCPcopy Index your code
hub / github.com/nodejs/node / fail

Method fail

tools/inspector_protocol/jinja2/parser.py:52–59  ·  view source on GitHub ↗

Convenience method that raises `exc` with the message, passed line number or last line number as well as the current name and filename.

(self, msg, lineno=None, exc=TemplateSyntaxError)

Source from the content-addressed store, hash-verified

50 self._end_token_stack = []
51
52 def fail(self, msg, lineno=None, exc=TemplateSyntaxError):
53 """Convenience method that raises `exc` with the message, passed
54 line number or last line number as well as the current name and
55 filename.
56 """
57 if lineno is None:
58 lineno = self.stream.current.lineno
59 raise exc(msg, lineno, self.name, self.filename)
60
61 def _fail_ut_eof(self, name, end_token_stack, lineno):
62 expected = []

Callers 15

_fail_ut_eofMethod · 0.95
parse_statementMethod · 0.95
parse_blockMethod · 0.95
parse_fromMethod · 0.95
parse_signatureMethod · 0.95
parse_call_blockMethod · 0.95
parse_assign_targetMethod · 0.95
parse_primaryMethod · 0.95
parse_tupleMethod · 0.95
parse_subscriptMethod · 0.95
ensureMethod · 0.95
parse_testMethod · 0.95

Calls

no outgoing calls

Tested by 1

mock_runMethod · 0.36