8000 Add exception as HTML comment to beginning and end of `exception_full.html.twig` by ruudk · Pull Request #31514 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
  • Loading branch information
ruudk committed May 24, 2019
commit 11c8b4531fa9c28442ed43d0c1e541a97dc3012d
5 changes: 5 additions & 0 deletions src/Symfony/Bundle/TwigBundle/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
CHANGELOG
=========

4.4.0
-----

* added HTML comment to beginning and end of `exception_full.html.twig`

4.2.0
-----

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
{% block before_html %}{% endblock %}
<!DOCTYPE html>
<html>
<head>
Expand Down Expand Up @@ -34,3 +35,4 @@
{{ include('@Twig/base_js.html.twig') }}
</body>
</html>
{% block after_html %}{% endblock %}
0