{% if exception.query %}

{{ exception.__class__.__name__ }}: {{ html_escape(exception) }}

{% else %}

{{ exception.__class__.__name__ }}{% if exception.message %}: {{ exception.message }}{% elif exception.args %}: {% for arg in exception.args %}{{ html_escape(arg) }}{% endfor %}{% endif %}

{% endif %} {# help text #} {% if isinstance(exception, TemplateNotFound) %}

Theme paths:

{{ pformat(context.templating_engine.theme_paths) }}
{% endif %} {% if isinstance(exception, LinkError) %}

Supported reStructuredText formats:

{{ html_escape(':link:`home.rst`') }}
{{ html_escape(':link:`Link to home ') }}`

Supported templating formats:

{{ html_escape("{{ link('home.rst') }}") }}
{{ html_escape("{{ link('home.rst', 'Link to home') }}") }}

{% endif %} {% for path, lineno, content_path in stack %} {% if content_path %}

{{ content_path }}

{{ gen_snippet(path, lineno, show_linenos=False) }}
{% else %}

{{ path }}:{{ lineno }}

{{ gen_snippet(path, lineno, show_linenos=True) }}
{% endif %} {% endfor %}