Пример #1
0
 public static function setClient($client, $error_handler = null)
 {
     self::$client = $client;
     if (!$error_handler) {
         $error_handler = new Raven_ErrorHandler($client);
     }
     self::$errorHandler = $error_handler;
 }
 public function register()
 {
     $sentry_dsn = PhabricatorEnv::getEnvConfigIfExists('sentry.dsn');
     if (empty($sentry_dsn)) {
         return;
     }
     Raven_Autoloader::register();
     // Configure the client
     $client = new Raven_Client($sentry_dsn);
     // Install error handlers
     $error_handler = new Raven_ErrorHandler($client);
     $error_handler->registerExceptionHandler();
     $error_handler->registerErrorHandler();
     // We can't override DarkConsole, so let's capture them at the
     // end of the request
     SentryLogger::setClient($client);
     register_shutdown_function(array('SentryLogger', 'logAllPendingErrors'));
 }
Пример #3
0
 public static function setClient($client)
 {
     self::$client = $client;
 }