Browse Source
PHP supports exception stacks since 5.3 so we should use it. Also Errorhandler is now able to display the stack: #297tags/2.0.0-beta
Carsten Brandt
12 years ago
9 changed files with 82 additions and 11 deletions
@ -0,0 +1,20 @@
|
||||
<div class="previous"> |
||||
<h1><span class="arrow">↵</span><span>Caused by: </span><?php |
||||
/** |
||||
* @var \yii\base\View $this |
||||
* @var \yii\base\Exception $exception |
||||
* @var string $previousHtml |
||||
* @var \yii\base\ErrorHandler $context |
||||
*/ |
||||
$context = $this->context; |
||||
if ($exception instanceof \yii\base\Exception) { |
||||
echo '<span>' . $context->htmlEncode($exception->getName()) . '</span>'; |
||||
echo ' – ' . $context->addTypeLinks(get_class($exception)); |
||||
} else { |
||||
echo '<span>' . $context->htmlEncode(get_class($exception)) . '</span>'; |
||||
} |
||||
?></h1> |
||||
<h2><?php echo $context->htmlEncode($exception->getMessage()); ?></h2>
|
||||
<p>In <span class="file"><?php echo $exception->getFile(); ?></span> at line <span class="line"><?php echo $exception->getLine(); ?></span></p>
|
||||
<?php echo $previousHtml; ?> |
||||
</div> |
Loading…
Reference in new issue