better error reporting for db exceptions

This commit is contained in:
Carsten Brandt
2013-12-05 15:39:34 +01:00
parent 59d6d0be7d
commit 24ebc9fc3d
2 changed files with 3 additions and 18 deletions

View File

@@ -360,6 +360,9 @@ pre .diff .change{
?></h1>
<?php endif; ?>
<h2><?= nl2br($handler->htmlEncode($exception->getMessage())) ?></h2>
<?php if ($exception instanceof \yii\db\Exception): ?>
<pre><?= var_export($exception->errorInfo, true) ?></pre>
<?php endif; ?>
<?= $handler->renderPreviousExceptions($exception) ?>
</div>