{% function id(){ return id._old_id++; }; id._old_id = 0; %}

{{ __("Error Report") }}

{{ doc.pyver }}

{{ __("Timestamp") }}:
{{ doc.timestamp }}
{{ __("Relapsed") }}
{{ doc.relapses }}

{{ __("Exception") }}

{{ frappe.render_template("error_object", {x: JSON.parse(doc.exception)}) }}

{{ __("Locals") }}

{{ frappe.render_template("error_object", {x: JSON.parse(doc.locals)} )}}

{{ __("Traceback") }}

{% var frames = JSON.parse(doc.frames); %} {% for (var i in frames) { %} {% var frameid = id(), frame = frames[i] %}

{{ frame.file }}: {{ frame.lnum }}

{% for (var index in frame.lines) { %} {% var line = frame.lines[index] %}
{{ index }} {{ line }}
{% } %}
{{ __("Locals") }}

{{ __("Locals") }}

{{ frappe.render_template("error_object", {x: frame.dump }) }}

{% } %}