bug #26922 [TwigBundle] fix rendering exception stack traces (xabbuh)
This PR was merged into the 3.4 branch.
Discussion
----------
[TwigBundle] fix rendering exception stack traces
| Q | A
| ------------- | ---
| Branch? | 3.4
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets |
| License | MIT
| Doc PR |
Commits
-------
99302e72fc
fix rendering exception stack traces
This commit is contained in:
commit
baeb1bf671
@ -1,5 +1,4 @@
|
|||||||
{% if exception.trace|length %}
|
{% if exception.trace|length %}
|
||||||
<pre class="stacktrace">
|
|
||||||
{{ exception.class }}:
|
{{ exception.class }}:
|
||||||
{% if exception.message is not empty %}
|
{% if exception.message is not empty %}
|
||||||
{{- exception.message }}
|
{{- exception.message }}
|
||||||
@ -8,5 +7,4 @@
|
|||||||
{% for trace in exception.trace %}
|
{% for trace in exception.trace %}
|
||||||
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
|
{{ include('@Twig/Exception/trace.txt.twig', { trace: trace }, with_context = false) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</pre>
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -17,7 +17,13 @@
|
|||||||
<tbody id="trace-text-{{ index }}">
|
<tbody id="trace-text-{{ index }}">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
{{ include('@Twig/Exception/traces.txt.twig', { exception: exception }, with_context = false) }}
|
{% if exception.trace|length %}
|
||||||
|
<pre class="stacktrace">
|
||||||
|
{%- filter escape('html') -%}
|
||||||
|
{{- include('@Twig/Exception/traces.txt.twig', { exception: exception, format: 'html' }, with_context = false) }}
|
||||||
|
{% endfilter %}
|
||||||
|
</pre>
|
||||||
|
{% endif %}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Reference in New Issue
Block a user