Skip to content

Commit

Permalink
Make function first in stack trace.
Browse files Browse the repository at this point in the history
  • Loading branch information
markstory committed Dec 1, 2014
1 parent 43b1469 commit f40cba9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Template/Element/exception_stack_trace_nav.ctp
Expand Up @@ -19,14 +19,14 @@ use Cake\Error\Debugger;
<li class="stack-frame">
<?php if (isset($stack['file']) && isset($stack['line'])): ?>
<a href="#" data-target="stack-frame-<?= $i ?>">
<span class="stack-file"><?= h(Debugger::trimPath($stack['file'])) ?></span>
<?php if (!isset($stack['class'])): ?>
<span class="stack-function"><?= h($stack['function']) ?></span>
<?php else: ?>
<span class="stack-function"><?= h($stack['class']) ?>::<?= h($stack['function']) ?></span>
<?php endif; ?>
, line
<span class="stack-line"><?= $stack['line'] ?></span>
<span class="stack-file">
<?= h(Debugger::trimPath($stack['file'])) ?>, line <?= $stack['line'] ?>
</span>
</a>
<?php else: ?>
<a href="#">[internal function]</a>
Expand Down
7 changes: 7 additions & 0 deletions src/Template/Layout/dev_error.ctp
Expand Up @@ -188,6 +188,7 @@ header {
padding: 10px;
}
.stack-frame a {
display: block;
color: #626262;
}
.stack-frame.active {
Expand All @@ -203,6 +204,12 @@ header {
.stack-file {
font-family: consolas, monospace;
}
.stack-function {
font-weight: bold;
}
.stack-file {
font-size: 0.9em;
}

.stack-details {
background: #ececec;
Expand Down

0 comments on commit f40cba9

Please sign in to comment.