Improved the stack traces that don't contain a function

This commit is contained in:
Javier Eguiluz 2017-05-07 17:32:13 +02:00
parent e5bb8fad3f
commit 9457558457
2 changed files with 4 additions and 7 deletions

View File

@ -1,9 +1,6 @@
{% if trace.function %}
{{- trace.class ~ trace.type ~ trace.function }}({{ trace.args|format_args }})
{%- else -%}
n/a
at {{ trace.class ~ trace.type ~ trace.function }}({{ trace.args|format_args }})
{%- endif -%}
{% if trace.file|default('') is not empty and trace.line|default('') is not empty %}
({{ trace.file|format_file(trace.line)|striptags|replace({ (' at line ' ~ trace.line): '' }) }}:{{ trace.line }})
{%- endif -%}
{{- trace.function ? '\n (' : 'at '}}{{ trace.file|format_file(trace.line)|striptags|replace({ (' at line ' ~ trace.line): '' }) }}:{{ trace.line }}{{ trace.function ? ')' }}
{%- endif %}

View File

@ -6,7 +6,7 @@
{% endif %}
{% for trace in exception.trace %}
at {{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
{% endfor %}
</pre>
{% endif %}