Undocumented
Function | fake |
Produce a new traceback object that looks like it came from the template source instead of the compiled code. The filename, line number, and location name will point to the template, and the local variables will be the current template context. |
Function | get |
Based on the runtime locals, get the context that would be available at that point in the template. |
Function | rewrite |
Rewrite the current exception to replace any tracebacks from within compiled template code with tracebacks that look like they came from the template source. |
Produce a new traceback object that looks like it came from the template source instead of the compiled code. The filename, line number, and location name will point to the template, and the local variables will be the current template context. :param exc_value: The original exception to be re-raised to create the new traceback. :param tb: The original traceback to get the local variables and code info from. :param filename: The template filename. :param lineno: The line number in the template source.
Parameters | |
excBaseException | Undocumented |
tb:t.Optional[ | Undocumented |
filename:str | Undocumented |
lineno:int | Undocumented |
Returns | |
TracebackType | Undocumented |
Rewrite the current exception to replace any tracebacks from within compiled template code with tracebacks that look like they came from the template source. This must be called within an ``except`` block. :param source: For ``TemplateSyntaxError``, the original source if known. :return: The original exception with the rewritten traceback.
Parameters | |
source:t.Optional[ | Undocumented |
Returns | |
BaseException | Undocumented |