Add plain-text exception to exception page

This commit is contained in:
Igor Wiedler 2013-01-08 03:27:23 +01:00 committed by Fabien Potencier
parent d901afdd2f
commit e602122f97
3 changed files with 24 additions and 0 deletions

View File

@ -1,3 +1,7 @@
.sf-reset pre {
white-space: pre;
font-size: 12px;
}
.sf-reset .traces {
padding-bottom: 14px;
}

View File

@ -88,6 +88,8 @@
</div>
{% endif %}
{% include 'TwigBundle:Exception:traces_text.html.twig' with { 'exception': exception } only %}
<script type="text/javascript">//<![CDATA[
function toggle(id, clazz) {
var el = document.getElementById(id),

View File

@ -0,0 +1,18 @@
<div class="block">
<h2>
Stack Trace (Plain Text)&nbsp;
{% spaceless %}
<a href="#" onclick="toggle('traces-text'); switchIcons('icon-traces-text-open', 'icon-traces-text-close'); return false;">
<img class="toggle" id="icon-traces-text-close" alt="-" src="data:image/gif;base64,R0lGODlhEgASAMQSANft94TG57Hb8GS44ez1+mC24IvK6ePx+Wa44dXs92+942e54o3L6W2844/M6dnu+P/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABIALAAAAAASABIAQAVCoCQBTBOd6Kk4gJhGBCTPxysJb44K0qD/ER/wlxjmisZkMqBEBW5NHrMZmVKvv9hMVsO+hE0EoNAstEYGxG9heIhCADs=" style="display: none" />
<img class="toggle" id="icon-traces-text-open" alt="+" src="data:image/gif;base64,R0lGODlhEgASAMQTANft99/v+Ga44bHb8ITG52S44dXs9+z1+uPx+YvK6WC24G+944/M6W28443L6dnu+Ge54v/+/l614P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAABMALAAAAAASABIAQAVS4DQBTiOd6LkwgJgeUSzHSDoNaZ4PU6FLgYBA5/vFID/DbylRGiNIZu74I0h1hNsVxbNuUV4d9SsZM2EzWe1qThVzwWFOAFCQFa1RQq6DJB4iIQA7" style="display: inline" />
</a>
{% endspaceless %}
</h2>
<div id="traces-text" class="trace" style="display: none;">
<pre>{% for i, e in exception.toarray %}
[{{ i + 1 }}] {{ e.class }}: {{ e.message }}
{% include 'TwigBundle:Exception:traces.txt.twig' with { 'exception': e } only %}
{% endfor %}</pre>
</div>
</div>