diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -14,11 +14,28 @@ require('./vendor/autoload.php'); $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); + } echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n"; } |