Undocumented
Function | fake_traceback |
No summary |
Function | get_template_locals |
Based on the runtime locals, get the context that would be available at that point in the template. |
Function | rewrite_traceback_stack |
Rewrite the current exception to replace any tracebacks from within compiled template code with tracebacks that look like they came from the template source. |
Function | tb_set_next |
Undocumented |
Parameters | |
exc_value:BaseException | The original exception to be re-raised to create the new traceback. |
tb:t.Optional[ | The original traceback to get the local variables and code info from. |
filename:str | The template filename. |
lineno:int | The line number in the template source. |
Returns | |
TracebackType | Undocumented |
Parameters | |
real_locals:t.Mapping[ | Undocumented |
Returns | |
t.Dict[ | 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.
Parameters | |
source:t.Optional[ | For TemplateSyntaxError, the original source if known. |
Returns | |
BaseException | The original exception with the rewritten traceback. |