/** * Generates a Response for all Exceptions without a specific override * * @return Response */ public function get_response() { // Log the exception Kohana_Exception::log($this); $response = Response::factory(); $view = Swiftriver::get_base_error_view(); $view->content = View::factory('pages/errors/404')->set('page', $this->request()->uri()); $response->body($view->render()); return $response; }
/** * Exception handler, logs the exception and generates a * Response object for display * * @param Exception $e * @return boolean */ public static function _handler(Exception $e) { // Log the error Kohana::$log->add(Log::ERROR, $e->getMessage()); // Generate the response $response = Response::factory(); $view = Swiftriver::get_base_error_view(); $view->content = View::factory('pages/errors/default'); $response->body($view->render()); return $response; }