jinja2.parser.Parser.fail

Parser.fail(msg, lineno=None, exc=<class 'jinja2.exceptions.TemplateSyntaxError'>)[source]

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