-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart.php
More file actions
35 lines (33 loc) · 815 Bytes
/
Copy pathstart.php
File metadata and controls
35 lines (33 loc) · 815 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<?php
/**
* Lancement du framework.
*
* @author dev <dev@solire.fr>
* @license CC by-nc http://creativecommons.org/licenses/by-nc/3.0/fr/
*/
namespace Solire\Lib;
/* = lancement du script
------------------------------- */
try {
FrontController::init();
FrontController::run();
} catch (Exception\Marvin $exc) {
Error::report($exc);
} catch (Exception\User $exc) {
Error::message($exc);
} catch (Exception\HttpError $exc) {
if ($exc->getHttp() == '404') {
header('HTTP/1.0 404 Not Found');
FrontController::run('Error', 'error404');
} else {
Error::http($exc->getHttp());
}
} catch (\Exception $exc) {
$marvin = new Marvin('debug', $exc);
if ($debug) {
$marvin->display();
} else {
$marvin->send();
}
Error::run();
}