/** * @see \Fuel\Core\Error::show_production_error() */ public static function show_production_error(\Exception $e) { $config = \Config::load('sentry', true); if ($config[\Fuel::$env]['php']['enabled']) { Sentry::send_exception($e); } parent::show_production_error($e); }
public static function exception_handler(\Exception $e) { // Try and stop the cache try { \CMF\Cache::stop(); } catch (\Exception $e) { } parent::exception_handler($e); }
/** * Amon Error handler * * @param int $severity the severity code * @param string $message the error message * @param string $filepath the path to the file throwing the error * @param int $line the line number of the error * @return bool whether to continue with execution */ public static function error_handler($severity, $message, $filepath, $line) { switch ($severity) { case E_NOTICE: case E_USER_NOTICE: $e = new Amon_Php_Notice($message, $severity, $filepath, $line); break; case E_WARNING: case E_USER_WARNING: $e = new Amon_Php_Warning($message, $severity, $filepath, $line); break; case E_STRICT: $e = new Amon_Php_Strict($message, $severity, $filepath, $line); break; case E_PARSE: $e = new Amon_Php_Parse($message, $severity, $filepath, $line); break; default: $e = new Amon_Php_Error($message, $severity, $filepath, $line); } self::handle_exception($e); return parent::error_handler($severity, $message, $filepath, $line); }