Skip to content

Commit

Permalink
Show more context around stack trace excerpts.
Browse files Browse the repository at this point in the history
I find this is helpful when digging through stack traces.
  • Loading branch information
markstory committed Dec 1, 2014
1 parent f40cba9 commit 3aeebac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Template/Element/exception_stack_trace.ctp
Expand Up @@ -22,7 +22,7 @@ foreach ($error->getTrace() as $i => $stack):
$excerpt = $params = [];

if (isset($stack['file']) && isset($stack['line'])):
$excerpt = Debugger::excerpt($stack['file'], $stack['line'] - 1, 2);
$excerpt = Debugger::excerpt($stack['file'], $stack['line'] - 1, 4);
endif;

if (isset($stack['file'])):
Expand All @@ -46,7 +46,7 @@ foreach ($error->getTrace() as $i => $stack):
<a href="#" class="stack-frame-args" data-target="stack-args-<?= $i ?>">toggle arguments</a>

<table class="code-excerpt" cellspacing="0" cellpadding="0">
<?php $lineno = $stack['line'] - 3 ?>
<?php $lineno = $stack['line'] - 4 ?>
<?php foreach ($excerpt as $l => $line): ?>
<tr>
<td class="excerpt-number" data-number="<?= $lineno + $l ?>"></td>
Expand Down

0 comments on commit 3aeebac

Please sign in to comment.