blob: 41a21841984921cb845cc0e666238782b8abc38f (
plain)
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
36
37
38
39
40
41
42
|
<?php
use Wcms\Logger;
session_start();
require('./vendor/autoload.php');
try {
Logger::init('w_error.log', 2);
} catch (Throwable $e) {
die('Unable to init logs: ' . $e->getMessage());
}
$app = new Wcms\Application();
$app->wakeup();
if (isreportingerrors()) {
Sentry\init([
'dsn' => Wcms\Config::sentrydsn(),
'release' => getversion(),
'project_root' => 'app',
]);
Sentry\configureScope(function ($scope) {
$scope->setUser([
'id' => Wcms\Config::url(),
'username' => Wcms\Config::basepath(),
]);
});
}
try {
$matchoper = new Wcms\Routes();
$matchoper->match();
} catch (Exception $e) {
if (isreportingerrors()) {
Sentry\captureException($e);
}
Logger::errorex($e, true);
echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n";
}
|