瀏覽代碼

[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.
Ryan Weaver 14 年之前
父節點
當前提交
39f81753ce
共有 1 個文件被更改,包括 3 次插入3 次删除
  1. 3 3
      src/Symfony/Bundle/FrameworkBundle/Resources/views/Exception/traces.html.twig

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

@@ -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>
@@ -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 %}