add unknown error

This commit is contained in:
osaajani 2020-06-14 01:39:09 +02:00
parent b560313aaf
commit 54a8029b69
4 changed files with 35 additions and 0 deletions

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -25,4 +25,13 @@ namespace controllers\internals;
http_response_code(404); http_response_code(404);
$this->render('error/404'); $this->render('error/404');
} }
/**
* Return unknown error page
*/
public function unknown ()
{
http_response_code(500);
$this->render('error/unknown');
}
} }

View File

@ -23,3 +23,8 @@
$controller = new \controllers\internals\HttpError(); $controller = new \controllers\internals\HttpError();
$controller->_404(); $controller->_404();
} }
catch (\Throwable $e)
{
$controller = new \controllers\internals\HttpError();
$controller->unknown();
}

View File

@ -0,0 +1,20 @@
<?php
//Template dashboard
$this->render('incs/head', ['title' => ''])
?>
<div class="container-fluid">
<div class="row">
<div class="col-xs-10 col-xs-offset-1 col-md-4 col-md-offset-4 text-center" style="color: #fff">
<h1>Une erreur inconnue est survenue, vous devriez peut-être -essayer dans quelques minutes.</h1>
<br/>
<img src="<?= HTTP_PWD_IMG; ?>/error_unknown.svg" width="100%"/>
<br/><br/>
<br/><br/>
<a href="<?= HTTP_PWD; ?>" class="btn btn-default btn-lg">Retour à l'accueil</a>
<br/><br/>
</div>
</div>
</div>
<?php
$this->render('incs/footer');