MCPcopy Create free account
hub / github.com/nodejs/node / Failure

Class Failure

deps/v8/third_party/jinja2/lexer.py:252–264  ·  view source on GitHub ↗

Class that raises a `TemplateSyntaxError` if called. Used by the `Lexer` to specify known errors.

Source from the content-addressed store, hash-verified

250
251
252class Failure:
253 """Class that raises a `TemplateSyntaxError` if called.
254 Used by the `Lexer` to specify known errors.
255 """
256
257 def __init__(
258 self, message: str, cls: t.Type[TemplateSyntaxError] = TemplateSyntaxError
259 ) -> None:
260 self.message = message
261 self.error_class = cls
262
263 def __call__(self, lineno: int, filename: str) -> "te.NoReturn":
264 raise self.error_class(self.message, lineno, filename)
265
266
267class Token(t.NamedTuple):

Callers 1

__init__Method · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected