diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 30 |
1 files changed, 19 insertions, 11 deletions
@@ -13,24 +13,32 @@ require('./vendor/autoload.php'); $app = new Wcms\Application(); $app->wakeup(); -Sentry\init([ - 'dsn' => Wcms\Config::sentrydsn(), - 'release' => getversion(), - 'project_root' => 'app', -]); -Sentry\configureScope(function (Sentry\State\Scope $scope): void { - $scope->setUser([ - 'id' => Wcms\Config::url(), - 'username' => Wcms\Config::basepath(), +try { + 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(), + ]); + }); +} catch (Throwable $th) { + // No problem: Sentry is optionnal +} try { $matchoper = new Wcms\Routes(); $matchoper->match(); } catch (Exception $e) { - Sentry\captureException($e); + try { + Sentry\captureException($e); + } catch (Throwable $th) { + // No problem: Sentry is optionnal + } echo '<h1>⚠ Woops ! There is a little problem : </h1>', $e->getMessage(), "\n"; } |