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

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

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 4, 2019
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 5 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 %}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.