{{ event.ingested_at|date:"j M G:i T" }} (Event {{ event.digest_order|intcomma }} of {{ issue.digested_event_count|intcomma }})
{% include "issues/_event_nav.html" %}
No stacktrace available for this event.
{% endif %}
{% for exception in exceptions %}
{% if forloop.counter0 == 0 %}
{{ event.ingested_at|date:"j M G:i T" }} (Event {{ event.digest_order|intcomma }} of {{ issue.digested_event_count|intcomma }})
{% endif %}
{{ exception.type }}
{{ exception.value }}
{% if forloop.counter0 == 0 %}
{% include "issues/_event_nav.html" %}
{% endif %}
{% for frame in exception.stacktrace.frames %}
{% with frame=frame|pygmentize:event.platform %}
{# per frame div #}
{% if frame.raise_point %}{% endif %}
{% if frame.in_app %}{% endif %}
{% if forloop.first and forloop.parentloop.first %}{% endif %}
{# per frame header div #}
{# filename, function, lineno #}
{% if frame.in_app %}
{{ frame.filename }}{% if frame.function %} in {{ frame.function }}{% endif %}{% if frame.lineno %} line {{ frame.lineno }}{% endif %}.
{% else %}
{{ frame.filename }}{% if frame.function %} in {{ frame.function }}{% endif %}{% if frame.lineno%} line {{ frame.lineno }}{% endif %}.
{% endif %}
{# indicator for frame's position in stacktrace #}
{% if stack_of_plates and forloop.first or not stack_of_plates and forloop.last %}
{% if stack_of_plates and forloop.parentloop.first or not stack_of_plates and forloop.parentloop.last %}
raise {{ exception.type }}
{% else %}
raise {{ exception.type }} (handled)
{% endif %}
{% elif stack_of_plates and forloop.last or not stack_of_plates and forloop.first %} {# strictly speaking, not actually "else", but to avoid clutter we hide 'outermost' info when this is also the raise-point #}
{% if stack_of_plates and forloop.parentloop.first or not stack_of_plates and forloop.parentloop.last %}
→ begin
{% else %}
{% comment %}I find it (quite too) hard to come up with a good name for this type of frame that is both short and clear. Thoughts so fare were:
* try...
* start try
* start failing try (handled)
* "begin handled" ()
* "begin handled" {{ exception.type }}
* "outermost handled"
* "divergence w/ main exception"
* first unique frame
{% endcomment %}
try…
{% endif %}
{% endif %}
{# chevron #}
{# per frame header div #}
{# collapsable part #}
{# convience div for padding & border; the border is basically the top-border of the next header #}
{% if "context_line" in frame and frame.context_line is not None %}
{# code listing #}
{# the spread-out pX-6 in this code is intentional to ensure the padding is visible when scrolling to the right, and not visible when scrolling is possible (i.e. the text is cut-off awkwardly to hint at scrolling #}
{% for line in frame.pre_context %}
{{ line }} {# leave space to avoid collapse #}
{% endfor %}
{# the gradient is a workaround, because I can't get a full-width elem going here inside the overflow #}
{# when some other line is overflowing. Using the gradient hides this fact (it happens to also look good) #}
{{ frame.context_line }} {# leave space to avoid collapse #}
{% for line in frame.post_context %}
{{ line }} {# leave space to avoid collapse #}
{% endfor %}
{% endif %}
{% if frame.vars %}
{# variables #}
Variable
Value
{% for var, value in frame.vars|items %}
{{ var }}
{{ value|format_var }}
{% endfor %}
{% if frame.vars|incomplete %}
<{{ frame.vars.incomplete }} items trimmed…>
{% endif %}
{% endif %}
{% if "context_line" not in frame or frame.context_line is None %}{% if not frame.vars %}{# nested ifs as a subsitute for brackets-in-templates #}
No code context or variables available for this frame.
{% endif %}{% endif %}
{# collapsable part #}
{# per frame div #}
{% endwith %}
{% endfor %} {# frame #}
{# #} {# per-exception div in the multi-exception case #}
{% if not forloop.last %}
{% if not stack_of_plates %}
During handling of the above exception another exception occurred or was intentionally reraised:
{# note: the above is specific to Python. We cannot distinguish between Python's 2 types of chained exceptions because the info is not sent by the client #}
{# we could try to infer this from the stacktrace, but parsing potentially arbitrarily formatted partial code is brittle #}
{% else %}
The above exception was caused by or intentially reraised during the handling of the following exception: