Add exception as HTML comment to beginning and end of exception_full.html.twig

Every now and then you are confronted with an exception in Symfony's debug mode. Sometimes, you will see this in your browser console or terminal. To make it easier to easily see what's going on, this change adds a HTML comment on 2 locations:
- before the `<html>` tag;
- after the `</html>` tag.

This way, you don't have to scan the very verbose HTML that Symfony generates. You can quickly glance at the end or the beginning.
This commit is contained in:
Ruud Kamphuis 2019-05-21 09:45:21 +02:00
parent beb603694d
commit 11c8b4531f
No known key found for this signature in database
GPG Key ID: 059472B12AA29D01
3 changed files with 15 additions and 0 deletions

View File

@ -1,6 +1,11 @@
CHANGELOG
=========
4.4.0
-----
* added HTML comment to beginning and end of `exception_full.html.twig`
4.2.0
-----

View File

@ -137,6 +137,14 @@
{{ exception.message }} ({{ status_code }} {{ status_text }})
{% endblock %}
{% block before_html %}
<!-- {{ exception.message }} ({{ status_code }} {{ status_text }}) -->
{% endblock %}
{% block after_html %}
<!-- {{ exception.message }} ({{ status_code }} {{ status_text }}) -->
{% endblock %}
{% block body %}
{% include '@Twig/Exception/exception.html.twig' %}
{% endblock %}

View File

@ -1,3 +1,4 @@
{% block before_html %}{% endblock %}
<!DOCTYPE html>
<html>
<head>
@ -34,3 +35,4 @@
{{ include('@Twig/base_js.html.twig') }}
</body>
</html>
{% block after_html %}{% endblock %}