Skip to content

Commit 39f8175

Browse files
committed
[FrameworkBundle] When there are multiple nested exceptions, this hides the stacktrace from all exceptions by default
This addresses the potential issue where a user doesn't realize that there are multiple exception messages because the full stack trace of the first exception is displayed (pushing the others far far down the page). This hides the stacktrace of all exceptions (when there are more than one) by default, making each exception message easily viewable.
1 parent a166b8d commit 39f8175

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/traces.html.twig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
{{ exception.class|abbr_class }}: {{ exception.message|replace({ "\n": '<br />' }) }}&nbsp;
66
{% spaceless %}
77
<a href="#" onclick="toggle('traces_{{ position }}', 'traces'); switchIcons('icon_traces_{{ position }}_open', 'icon_traces_{{ position }}_close'); return false;">
8-
<img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == position ? 'display' : 'hidden' }}" />
9-
<img class="toggle" id="icon_traces_{{ position }}_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: {{ 0 == position ? 'hidden' : 'display' }}; margin-left: -18px" />
8+
<img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == count ? 'display' : 'hidden' }}" />
9+
<img class="toggle" id="icon_traces_{{ position }}_open" alt="+" src="{{ asset('bundles/framework/images/blue_picto_more.gif') }}" style="visibility: {{ 0 == count ? 'hidden' : 'display' }}; margin-left: -18px" />
1010
</a>
1111
{% endspaceless %}
1212
</h2>
@@ -15,7 +15,7 @@
1515
{% endif %}
1616

1717
<a id="traces_link_{{ position }}"></a>
18-
<ol class="traces list_exception" id="traces_{{ position }}" style="display: {{ 0 == position ? 'block' : 'none' }}">
18+
<ol class="traces list_exception" id="traces_{{ position }}" style="display: {{ 0 == count ? 'block' : 'none' }}">
1919
{% for i, trace in exception.trace %}
2020
<li>
2121
{% include 'Framework:Exception:trace.html.twig' with { 'prefix': position, 'i': i, 'trace': trace } only %}

0 commit comments

Comments
 (0)