|
1 |
| -<div class="block-exception"> |
2 |
| - <div class="block-exception-detected clear-fix"> |
3 |
| - <div class="support"> |
4 |
| - <a href="http://symfony.com/support">Need support?</a> |
5 |
| - </div> |
6 |
| - <div class="illustration-exception"> |
7 |
| - {{ include('@Twig/Exception/exception.svg') }} |
| 1 | +<div class="exception-summary"> |
| 2 | + <div class="exception-metadata"> |
| 3 | + <div class="container"> |
| 4 | + <h2 class="exception-hierarchy"> |
| 5 | + {% for previousException in exception.allPrevious|reverse %} |
| 6 | + {{ previousException.class|abbr_class }} |
| 7 | + <span class="icon">{{ include('@Twig/images/chevron-right.svg') }}</span> |
| 8 | + {% endfor %} |
| 9 | + {{ exception.class|abbr_class }} |
| 10 | + </h2> |
| 11 | + <h2 class="exception-http"> |
| 12 | + HTTP {{ status_code }} <small>{{ status_text }}</small> |
| 13 | + </h2> |
8 | 14 | </div>
|
9 |
| - <div class="text-exception"> |
10 |
| - <div class="open-quote">“</div> |
11 |
| - |
12 |
| - <h1>{{ exception.message|nl2br|format_file_from_text }}</h1> |
13 |
| - |
14 |
| - <div> |
15 |
| - <strong>{{ status_code }}</strong> {{ status_text }} - {{ exception.class|abbr_class }} |
| 15 | + </div> |
| 16 | + <div class="container"> |
| 17 | + <div class="exception-message-wrapper"> |
| 18 | + <h1 class="break-long-words exception-message {{ exception.message|length > 180 ? 'long' }}"> |
| 19 | + {{- exception.message|nl2br|format_file_from_text -}} |
| 20 | + </h1> |
| 21 | + |
| 22 | + <div class="exception-illustration hidden-xs-down"> |
| 23 | + {{ include('@Twig/images/symfony-ghost.svg') }} |
16 | 24 | </div>
|
17 |
| - |
18 |
| - {% set previous_count = exception.allPrevious|length %} |
19 |
| - {% if previous_count %} |
20 |
| - <div class="linked"><span><strong>{{ previous_count }}</strong> linked Exception{{ previous_count > 1 ? 's' : '' }}:</span> |
21 |
| - <ul> |
22 |
| - {% for i, previous in exception.allPrevious %} |
23 |
| - <li> |
24 |
| - {{ previous.class|abbr_class }} <a href="#traces-link-{{ i + 1 }}" onclick="toggle('traces-{{ i + 1 }}', 'traces'); switchIcons('icon-traces-{{ i + 1 }}-open', 'icon-traces-{{ i + 1 }}-close');">»</a> |
25 |
| - </li> |
26 |
| - {% endfor %} |
27 |
| - </ul> |
28 |
| - </div> |
29 |
| - {% endif %} |
30 |
| - |
31 |
| - <div class="close-quote">”</div> |
32 | 25 | </div>
|
33 | 26 | </div>
|
34 | 27 | </div>
|
35 | 28 |
|
36 |
| -{% for position, e in exception.toarray %} |
37 |
| - {% include '@Twig/Exception/traces.html.twig' with { 'exception': e, 'position': position, 'count': previous_count } only %} |
38 |
| -{% endfor %} |
39 |
| - |
40 |
| -{% if logger %} |
41 |
| - <div class="block"> |
42 |
| - <div class="logs clear-fix"> |
43 |
| - {% spaceless %} |
44 |
| - <h2> |
45 |
| - Logs |
46 |
| - <a href="#" onclick="toggle('logs'); switchIcons('icon-logs-open', 'icon-logs-close'); return false;"> |
47 |
| - <img class="toggle" id="icon-logs-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: none" /> |
48 |
| - <img class="toggle" id="icon-logs-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: inline" /> |
49 |
| - </a> |
50 |
| - </h2> |
51 |
| - {% endspaceless %} |
| 29 | +<div class="container"> |
| 30 | + <div class="sf-tabs"> |
|
7E71
31 | + <div class="tab"> |
| 32 | + {% set exception_as_array = exception.toarray %} |
| 33 | + <h3 class="tab-title"> |
| 34 | + {% if exception_as_array|length > 1 %} |
| 35 | + Exceptions <span class="badge">{{ exception_as_array|length }}</span> |
| 36 | + {% else %} |
| 37 | + Exception |
| 38 | + {% endif %} |
| 39 | + </h3> |
| 40 | + |
| 41 | + <div class="tab-content"> |
| 42 | + {% for e in exception_as_array %} |
| 43 | + {{ include('@Twig/Exception/traces.html.twig', { exception: e, index: loop.index }, with_context = false) }} |
| 44 | + {% endfor %} |
| 45 | + </div> |
| 46 | + </div> |
52 | 47 |
|
53 |
| - {% if logger.counterrors %} |
54 |
| - <div class="error-count"> |
55 |
| - <span> |
56 |
| - {{ logger.counterrors }} error{{ logger.counterrors > 1 ? 's' : ''}} |
57 |
| - </span> |
58 |
| - </div> |
59 |
| - {% endif %} |
| 48 | + <div class="tab {{ logger is empty ? 'disabled' }}"> |
| 49 | + <h3 class="tab-title"> |
| 50 | + Logs |
| 51 | + {% if logger.counterrors ?? false %}<span class="badge status-error">{{ logger.counterrors }}</span>{% endif %} |
| 52 | + </h3> |
| 53 | + |
| 54 | + <div class="tab-content"> |
| 55 | + {% if logger %} |
| 56 | + {{ include('@Twig/Exception/logs.html.twig', { logs: logger.logs }, with_context = false) }} |
| 57 | + {% else %} |
| 58 | + <div class="empty"> |
| 59 | + <p>No log messages</p> |
| 60 | + </div> |
| 61 | + {% endif %} |
| 62 | + </div> |
60 | 63 | </div>
|
61 | 64 |
|
62 |
| - <div id="logs"> |
63 |
| - {% include '@Twig/Exception/logs.html.twig' with { 'logs': logger.logs } only %} |
| 65 | + <div class="tab"> |
| 66 | + <h3 class="tab-title"> |
| 67 | + {% if exception_as_array|length > 1 %} |
| 68 | + Stack Traces <span class="badge">{{ exception_as_array|length }}</span> |
| 69 | + {% else %} |
| 70 | + Stack Trace |
| 71 | + {% endif %} |
| 72 | + </h3> |
| 73 | + |
| 74 | + <div class="tab-content"> |
| 75 | + {% for e in exception_as_array %} |
| 76 | + {{ include('@Twig/Exception/traces_text.html.twig', { exception: e, index: loop.index, num_exceptions: loop.length }, with_context = false) }} |
| 77 | + {% endfor %} |
| 78 | + </div> |
64 | 79 | </div>
|
65 |
| - </div> |
66 |
| -{% endif %} |
67 | 80 |
|
68 |
| -{% if currentContent %} |
69 |
| - <div class="block"> |
70 |
| - {% spaceless %} |
71 |
| - <h2> |
72 |
| - Content of the Output |
73 |
| - <a href="#" onclick="toggle('output-content'); switchIcons('icon-content-open', 'icon-content-close'); return false;"> |
74 |
| - <img class="toggle" id="icon-content-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" /> |
75 |
| - <img class="toggle" id="icon-content-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" /> |
76 |
| - </a> |
77 |
| - </h2> |
78 |
| - {% endspaceless %} |
| 81 | + {% if currentContent is not empty %} |
| 82 | + <div class="tab"> |
| 83 | + <h3 class="tab-title">Output content</h3> |
79 | 84 |
|
80 |
| - <div id="output-content" style="display: none"> |
81 |
| - {{ currentContent }} |
| 85 | + <div class="tab-content"> |
| 86 | + {{ currentContent }} |
| 87 | + </div> |
82 | 88 | </div>
|
83 |
| - |
84 |
| - <div style="clear: both"></div> |
| 89 | + {% endif %} |
85 | 90 | </div>
|
86 |
| -{% endif %} |
87 |
| - |
88 |
| -{% include '@Twig/Exception/traces_text.html.twig' with { 'exception': exception } only %} |
89 |
| - |
90 |
| -<script type="text/javascript">//<![CDATA[ |
91 |
| - function toggle(id, clazz) { |
92 |
| - var el = document.getElementById(id), |
93 |
| - current = el.style.display, |
94 |
| - i; |
95 |
| -
|
96 |
| - if (clazz) { |
97 |
| - var tags = document.getElementsByTagName('*'); |
98 |
| - for (i = tags.length - 1; i >= 0; i--) { |
99 |
| - if (tags[i].className === clazz) { |
100 |
| - tags[i].style.display = 'none'; |
101 |
| - } |
102 |
| - } |
103 |
| - } |
104 |
| -
|
105 |
| - el.style.display = current === 'none' ? 'block' : 'none'; |
106 |
| - } |
107 |
| -
|
108 |
| - function switchIcons(id1, id2) { |
109 |
| - var icon1, icon2, display1, display2; |
110 |
| -
|
111 |
| - icon1 = document.getElementById(id1); |
112 |
| - icon2 = document.getElementById(id2); |
113 |
| -
|
114 |
| - display1 = icon1.style.display; |
115 |
| - display2 = icon2.style.display; |
116 |
| -
|
117 |
| - icon1.style.display = display2; |
118 |
| - icon2.style.display = display1; |
119 |
| - } |
120 |
| -//]]></script> |
| 91 | +</div> |
0 commit comments