[ 'php_version' => phpversion(), 'environment' => Request::getMode() ] ]; $this->client = new \Raven_Client(SentryConfig::getData('url'), $opinion); } public static function instance() { if (!isset(self::$instance)) { $instance = new self(); self::$instance = $instance; } else { $instance = self::$instance; } return $instance; } public function setException(){ $error_handler = new \Raven_ErrorHandler($this->client); $error_handler->registerExceptionHandler(); $error_handler->registerErrorHandler(); $error_handler->registerShutdownFunction(); // $this->client->install(); } public function exceptionHandler($ee) { $error_handler = new \Raven_ErrorHandler($this->client); $error_handler->registerExceptionHandler(); $error_handler->registerErrorHandler(); $error_handler->registerShutdownFunction(); $this->client->captureException($ee); } public function exMessage($msg) { $error_handler = new \Raven_ErrorHandler($this->client); $error_handler->registerExceptionHandler(); $error_handler->registerErrorHandler(); $error_handler->registerShutdownFunction(); $this->client->captureMessage($msg); } }