Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 260f161

Browse filesBrowse files
committed
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: - between the `<html>` and `<head>` tag; - between the `</body>` and `</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.
1 parent beb6036 commit 260f161
Copy full SHA for 260f161

File tree

3 files changed

+15
-0
lines changed
Filter options

3 files changed

+15
-0
lines changed

‎src/Symfony/Bundle/TwigBundle/CHANGELOG.md

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/CHANGELOG.md
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
CHANGELOG
22
=========
33

4+
4.4.0
5+
-----
6+
7+
* added HTML comment to beginning and end of `exception_full.html.twig`
8+
49
4.2.0
510
-----
611

‎src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception_full.html.twig
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,14 @@
137137
{{ exception.message }} ({{ status_code }} {{ status_text }})
138138
{% endblock %}
139139

140+
{% block after_head_charset %}
141+
<!-- {{ exception.message }} ({{ status_code }} {{ status_text }}) -->
142+
{% endblock %}
143+
144+
{% block after_body %}
145+
<!-- {{ exception.message }} ({{ status_code }} {{ status_text }}) -->
146+
{% endblock %}
147+
140148
{% block body %}
141149
{% include '@Twig/Exception/exception.html.twig' %}
142150
{% endblock %}

‎src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig

Copy file name to clipboardExpand all lines: src/Symfony/Bundle/TwigBundle/Resources/views/layout.html.twig
+2Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
<html>
33
<head>
44
<meta charset="{{ _charset }}" />
5+
{% block after_head_charset %}{% endblock %}
56
<meta name="robots" content="noindex,nofollow" />
67
<meta name="viewport" content="width=device-width,initial-scale=1" />
78
<title>{% block title %}{% endblock %}</title>
@@ -33,4 +34,5 @@
3334
{% block body %}{% endblock %}
3435
{{ include('@Twig/base_js.html.twig') }}
3536
</body>
37+
{% block after_body %}{% endblock %}
3638
</html>

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.