Improved error page

This commit is contained in:
Dmitry Khomutov 2017-04-16 20:46:51 +07:00
parent 42a9d7fc94
commit a671f4d81d
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
2 changed files with 10 additions and 2 deletions

View file

@ -39,7 +39,7 @@ abstract class Controller
public function __construct(Config $config, Request $request, Response $response)
{
$this->config = $config;
$this->config = $config;
$this->request = $request;
$this->response = $response;
}

View file

@ -3,7 +3,15 @@
<h2 class="box-title">Sorry, there was a problem</h2>
</div>
<?php
/** @var $exception \Exception */
?>
<div class="box-body">
<?php print $exception->getMessage(); ?>
<?= $exception->getMessage(); ?><br />
File: <?= $exception->getFile(); ?><br />
Line: <?= $exception->getLine(); ?><br />
<pre>
<?= $exception->getTraceAsString(); ?>
</pre>
</div>
</div>