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