jinja2.sandbox.SandboxedEnvironment.handle_exception

SandboxedEnvironment.handle_exception(exc_info=None, rendered=False, source_hint=None)

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