Better error handling/displaying with $config['debug'] and $config['verbose_errors']

This commit is contained in:
Michael Foster 2013-08-03 00:22:28 -04:00
parent 62f8ea4813
commit 1d37e81ade
5 changed files with 49 additions and 19 deletions

18
templates/error.html Normal file
View file

@ -0,0 +1,18 @@
<div style="text-align:center">
<h2 style="margin:20px 0">{{ message }}</h2>
{% if board %}
<p>
<a href="{{ config.root }}{% if mod %}{{ config.file_mod }}?/{% endif %}{{ board.dir }}{{ config.file_index }}">
{% trans 'Go back' %}
</a>
</p>
{% endif %}
</div>
{% if debug and config.debug %}
<hr>
<h3>{% trans 'Error information' %}</h3>
<pre style="white-space:pre-wrap;font-size: 10px;">
{{ debug }}
</pre>
<hr>
{% endif %}