previousException.php 1014 Bytes
Newer Older
1
<?php
2 3
/* @var $exception \yii\base\Exception */
/* @var $handler \yii\web\ErrorHandler */
4
?>
5
<div class="previous">
6 7 8
    <span class="arrow">&crarr;</span>
    <h2>
        <span>Caused by:</span>
9 10 11
        <?php $name = $handler->getExceptionName($exception);
            if ($name !== null): ?>
            <span><?= $handler->htmlEncode($name) ?></span> &ndash;
12 13 14 15 16 17 18
            <?= $handler->addTypeLinks(get_class($exception)) ?>
        <?php else: ?>
            <span><?= $handler->htmlEncode(get_class($exception)) ?></span>
        <?php endif; ?>
    </h2>
    <h3><?= nl2br($handler->htmlEncode($exception->getMessage())) ?></h3>
    <p>in <span class="file"><?= $exception->getFile() ?></span> at line <span class="line"><?= $exception->getLine() ?></span></p>
19 20 21
    <?php if ($exception instanceof \yii\db\Exception && !empty($exception->errorInfo)) {
        echo '<pre>Error Info: ' . print_r($exception->errorInfo, true) . '</pre>';
    } ?>
22
    <?= $handler->renderPreviousExceptions($exception) ?>
23
</div>