jinja2.sandbox.ImmutableSandboxedEnvironment.handle_exception

ImmutableSandboxedEnvironment.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.