Skip to content

Navigation Menu

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 11c8b45

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: - 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.
1 parent beb6036 commit 11c8b45
Copy full SHA for 11c8b45

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 before_html %}
141+
<!-- {{ exception.message }} ({{ status_code }} {{ status_text }}) -->
142+
{% endblock %}
143+
144+
{% block after_html %}
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
@@ -1,3 +1,4 @@
1+
{% block before_html %}{% endblock %}
12
<!DOCTYPE html>
23
<html>
34
<head>
@@ -34,3 +35,4 @@
3435
{{ include('@Twig/base_js.html.twig') }}
3536
</body>
3637
</html>
38+
{% block after_html %}{% endblock %}

0 commit comments

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