forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
53 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,24 @@ | ||
<?php | ||
/** | ||
* @var \yii\base\View $this | ||
* @var \yii\base\Exception $exception | ||
* @var string $previousHtml | ||
* @var \yii\base\ErrorHandler $context | ||
*/ | ||
$context = $this->context; | ||
?> | ||
<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> | ||
<span class="arrow">↵</span> | ||
<h2> | ||
<span>Caused by:</span> | ||
<?php if ($exception instanceof \yii\base\Exception): ?> | ||
<span><?php echo $context->htmlEncode($exception->getName()); ?></span> – | ||
<?php echo $context->addTypeLinks(get_class($exception)); ?> | ||
<?php else: ?> | ||
<span><?php echo $context->htmlEncode(get_class($exception)); ?></span> | ||
<?php endif; ?> | ||
</h2> | ||
<h3><?php echo $context->htmlEncode($exception->getMessage()); ?></h3> | ||
<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> | ||
</div> |