/** * Intercept exception handling to send a mail before continuing with the default logic * @see \Cake\Error\BaseErrorHandler::handleException() */ public function handleException(Exception $exception) { // send a debug mail with the fatal exception if ($this->email && !in_array(get_class($exception), $this->_skipExceptions)) { $this->email->debug('Application exception', Misc::dump($exception, $exception->getMessage(), true)); } // continue with exception handle logic parent::handleException($exception); }
/** * Handle uncaught exceptions. * * @param \Exception $exception Exception instance. * @return void * @throws \Exception When renderer class not found * @see http://php.net/manual/en/function.set-exception-handler.php */ public function handleException(Exception $exception) { $sentryHandler = new SentryHandler(); $sentryHandler->handle($exception); return parent::handleException($exception); }
/** * Handle uncaught exceptions. * * @param \Exception $exception Exception instance. * @return void * @throws \Exception When renderer class not found * @see http://php.net/manual/en/function.set-exception-handler.php */ public function handleException(Exception $exception) { $this->handle($exception); return parent::handleException($exception); }
/** * Encount exception handler * * @access public * @author sakuragawa */ public function handleException(Exception $exception) { $exceptionName = get_class($exception); $this->execute($exception->getCode(), $exceptionName, $exception->getMessage(), $exception->getFile(), $exception->getLine()); parent::handleException($exception); }