MCPcopy
hub / github.com/pallets/jinja / handle_exception

Method handle_exception

src/jinja2/environment.py:936–942  ·  src/jinja2/environment.py::Environment.handle_exception

Exception handling helper. This is used internally to either raise rewritten exceptions or return a rendered traceback for the template.

(self, source: t.Optional[str] = None)

Source from the content-addressed store, hash-verified

934 return names
935
936 def handle_exception(self, source: t.Optional[str] = None) -> class="st">"te.NoReturn":
937 class="st">"""Exception handling helper. This is used internally to either raise
938 rewritten exceptions or return a rendered traceback for the template.
939 class="st">"""
940 from .debug import rewrite_traceback_stack
941
942 raise rewrite_traceback_stack(source=source)
943
944 def join_path(self, template: str, parent: str) -> str:
945 class="st">"""Join a template with the parent. By default all the lookups are

Callers 10

parseMethod · 0.95
lexMethod · 0.95
compileMethod · 0.95
compile_expressionMethod · 0.95
renderMethod · 0.80
render_asyncMethod · 0.80
generateMethod · 0.80
generate_asyncMethod · 0.80
renderMethod · 0.80
render_asyncMethod · 0.80

Calls 1

rewrite_traceback_stackFunction · 0.85

Tested by

no test coverage detected