| 148 |
lars |
1 |
<div class="trace trace-as-html" id="trace-box-<?= $index; ?>">
|
|
|
2 |
<div class="trace-details">
|
|
|
3 |
<div class="trace-head">
|
|
|
4 |
<div class="sf-toggle" data-toggle-selector="#trace-html-<?= $index; ?>" data-toggle-initial="<?= $expand ? 'display' : ''; ?>">
|
|
|
5 |
<span class="icon icon-close"><?= $this->include('assets/images/icon-minus-square-o.svg'); ?></span>
|
|
|
6 |
<span class="icon icon-open"><?= $this->include('assets/images/icon-plus-square-o.svg'); ?></span>
|
|
|
7 |
<?php
|
|
|
8 |
$separator = strrpos($exception['class'], '\\');
|
|
|
9 |
$separator = false === $separator ? 0 : $separator + 1;
|
|
|
10 |
|
|
|
11 |
$namespace = substr($exception['class'], 0, $separator);
|
|
|
12 |
$class = substr($exception['class'], $separator);
|
|
|
13 |
?>
|
|
|
14 |
<?php if ('' === $class) { ?>
|
|
|
15 |
<br>
|
|
|
16 |
<?php } else { ?>
|
|
|
17 |
<h3 class="trace-class">
|
|
|
18 |
<?php if ('' !== $namespace) { ?>
|
|
|
19 |
<span class="trace-namespace"><?= $namespace; ?></span>
|
|
|
20 |
<?php } ?>
|
|
|
21 |
<?= $class; ?>
|
|
|
22 |
</h3>
|
|
|
23 |
<?php } ?>
|
|
|
24 |
<?php if ($exception['message'] && $index > 1) { ?>
|
|
|
25 |
<p class="break-long-words trace-message"><?= $this->escape($exception['message']); ?></p>
|
|
|
26 |
<?php } ?>
|
|
|
27 |
</div>
|
|
|
28 |
</div>
|
|
|
29 |
|
|
|
30 |
<div id="trace-html-<?= $index; ?>" class="sf-toggle-content">
|
|
|
31 |
<?php
|
|
|
32 |
$isFirstUserCode = true;
|
|
|
33 |
foreach ($exception['trace'] as $i => $trace) {
|
|
|
34 |
$isVendorTrace = $trace['file'] && (str_contains($trace['file'], '/vendor/') || str_contains($trace['file'], '/var/cache/'));
|
|
|
35 |
$displayCodeSnippet = $isFirstUserCode && !$isVendorTrace;
|
|
|
36 |
if ($displayCodeSnippet) {
|
|
|
37 |
$isFirstUserCode = false;
|
|
|
38 |
} ?>
|
|
|
39 |
<div class="trace-line <?= $isVendorTrace ? 'trace-from-vendor' : ''; ?>">
|
|
|
40 |
<?= $this->include('views/trace.html.php', [
|
|
|
41 |
'prefix' => $index,
|
|
|
42 |
'i' => $i,
|
|
|
43 |
'trace' => $trace,
|
|
|
44 |
'style' => $isVendorTrace ? 'compact' : ($displayCodeSnippet ? 'expanded' : ''),
|
|
|
45 |
]); ?>
|
|
|
46 |
</div>
|
|
|
47 |
<?php
|
|
|
48 |
} ?>
|
|
|
49 |
</div>
|
|
|
50 |
</div>
|
|
|
51 |
</div>
|