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: str,
lineno: t.Optional[int] = None,
exc: t.Type[TemplateSyntaxError] = TemplateSyntaxError,
)
| 72 | self._end_token_stack: t.List[t.Tuple[str, ...]] = [] |
| 73 | |
| 74 | def fail( |
| 75 | self, |
| 76 | msg: str, |
| 77 | lineno: t.Optional[int] = None, |
| 78 | exc: t.Type[TemplateSyntaxError] = TemplateSyntaxError, |
| 79 | ) -> "te.NoReturn": |
| 80 | """Convenience method that raises `exc` with the message, passed |
| 81 | line number or last line number as well as the current name and |
| 82 | filename. |
| 83 | """ |
| 84 | if lineno is None: |
| 85 | lineno = self.stream.current.lineno |
| 86 | raise exc(msg, lineno, self.name, self.filename) |
| 87 | |
| 88 | def _fail_ut_eof( |
| 89 | self, |
no outgoing calls
no test coverage detected