Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b560883

Browse files
committed
feature #27315 [TwigBundle] add exception chain breadcrumbs navigation (kiler129)
This PR was merged into the 4.2-dev branch. Discussion ---------- [TwigBundle] add exception chain breadcrumbs navigation | Q | A | ------------- | --- | Branch? | master | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #26824 | License | MIT | Doc PR | - Small DX improvement allowing to jump to exception in chain: ![preview](https://media.giphy.com/media/23chfZo9oFzdOrZzYl/giphy.gif) Commits ------- 5551e0c feature #26824 add exception chain breadcrumbs navigation
2 parents 5c338cc + 5551e0c commit b560883

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/exception.html.twig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
<div class="container">
44
<h2 class="exception-hierarchy">
55
{% for previousException in exception.allPrevious|reverse %}
6-
{{ previousException.class|abbr_class }}
6+
<a href="#trace-box-{{ loop.revindex + 1 }}">{{ previousException.class|abbr_class }}</a>
77
<span class="icon">{{ include('@Twig/images/chevron-right.svg') }}</span>
88
{% endfor %}
9-
{{ exception.class|abbr_class }}
9+
<a href="#trace-box-1">{{ exception.class|abbr_class }}</a>
1010
</h2>
1111
<h2 class="exception-http">
1212
HTTP {{ status_code }} <small>{{ status_text }}</small>

src/Symfony/Bundle/TwigBundle/Resources/views/Exception/traces.html.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div class="trace trace-as-html">
1+
<div class="trace trace-as-html" id="trace-box-{{ index }}">
22
<div class="trace-details">
33
<div class="trace-head">
44
<span class="sf-toggle" data-toggle-selector="#trace-html-{{ index }}" data-toggle-initial="{{ expand ? 'display' }}">

src/Symfony/Bundle/TwigBundle/Resources/views/exception.css.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ header .container { display: flex; justify-content: space-between; }
7373
.exception-summary { background: #B0413E; border-bottom: 2px solid rgba(0, 0, 0, 0.1); border-top: 1px solid rgba(0, 0, 0, .3); flex: 0 0 auto; margin-bottom: 15px; }
7474
.exception-metadata { background: rgba(0, 0, 0, 0.1); padding: 7px 0; }
7575
.exception-metadata .container { display: flex; flex-direction: row; justify-content: space-between; }
76-
.exception-metadata h2 { color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 400; margin: 0; }
76+
.exception-metadata h2, .exception-metadata h2 > a { color: rgba(255, 255, 255, 0.8); font-size: 13px; font-weight: 400; margin: 0; }
7777
.exception-http small { font-size: 13px; opacity: .7; }
7878
.exception-hierarchy { flex: 1; }
7979
.exception-hierarchy .icon { margin: 0 3px; opacity: .7; }

0 commit comments

Comments
 (0)