Commit d946907f by Alexis Ragot

Fixed exception display

parent 5b2841c3
......@@ -121,12 +121,19 @@ class Exception
$this->view->setSource('error', $exception);
} else {
$previous = null;
if ($exception instanceof \core\Exception) {
$previous = $exception;
}
$newException = new \core\Exception(
$this->translator->getText("An error occured during the process of your request. Please contact the administrator of the application."),
500,
$exception
$previous
);
$this->view->setSource('error', $exception);
$this->view->setSource('error', $newException);
}
$this->view->merge();
......
......@@ -22,14 +22,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<h1 class="modal-title" id="myModalLabel">Oops!...</h1>
</div>
<div class="modal-body">
<span>An error occured while processing your request.</span>
<span><?merge error.getMessage() ?></span>
<?merge error.getPrevious().bool() ?>
<button class="btn btn-default pull-right" type="button" data-toggle="collapse" data-target="#detail" aria-expanded="false" aria-controls="detail">
?
</button>
<?merge error.getPrevious().bool() ?>
<div class="collapse " id="detail">
<br/>
<code class="badge"><?merge error.getCode() ?></code>
<code><?merge error.getMessage() ?></code>
<code class="badge"><?merge error.getPrevious().getCode() ?></code>
<code><?merge error.getPrevious().getMessage() ?></code>
</div>
</div>
<div class="modal-footer">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment