Skip to content

Commit

Permalink
[FrameworkBundle] When there are multiple nested exceptions, this hid…
Browse files Browse the repository at this point in the history
…es 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.
  • Loading branch information
weaverryan committed Apr 2, 2011
1 parent a166b8d commit 39f8175
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -5,8 +5,8 @@
{{ exception.class|abbr_class }}: {{ exception.message|replace({ "\n": '<br />' }) }}&nbsp;
{% spaceless %}
<a href="#" onclick="toggle('traces_{{ position }}', 'traces'); switchIcons('icon_traces_{{ position }}_open', 'icon_traces_{{ position }}_close'); return false;">
<img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == position ? 'display' : 'hidden' }}" />
<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" />
<img class="toggle" id="icon_traces_{{ position }}_close" alt="-" src="{{ asset('bundles/framework/images/blue_picto_less.gif') }}" style="visibility: {{ 0 == count ? 'display' : 'hidden' }}" />
<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" />
</a>
{% endspaceless %}
</h2>
Expand All @@ -15,7 +15,7 @@
{% endif %}

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

0 comments on commit 39f8175

Please sign in to comment.