hasValues('sentry:dsn')) (function($cfg) { \Sentry\init([ 'dsn' => $cfg->getString('dsn'), 'traces_sample_rate' => $cfg->getFloat('tracesRate', 0.2), 'profiles_sample_rate' => $cfg->getFloat('profilesRate', 0.2), ]); set_exception_handler(function(\Throwable $ex) { \Sentry\captureException($ex); }); })($config->scopeTo('sentry')); try { $db = DbTools::create($config->getString('dsn')); } catch(ConnectionFailedException $ex) { echo '

Unable to connect to database

'; die($ex->getMessage()); } $awk = new AwakiContext($db, $config->scopeTo('urls'));