_params = $params; $this->_e = $e; } public function _render_view() { $buffer = ''; $this->_report = $this->_params['report']; unset($this->_params['report']); if (\Rails::application()->config()->consider_all_requests_local) { $no_html = \Rails::cli(); if ($no_html) { $buffer .= strip_tags($this->_report); $buffer .= "\n"; } else { $buffer .= $this->_header(); $buffer .= $this->_report; $buffer .= $this->_footer(); } } else { $file = \Rails::publicPath() . '/' . $this->_params['status'] . '.html'; if (is_file($file)) { $buffer = file_get_contents($file); } } $this->_buffer = $buffer; } public function _print_view() { return $this->_buffer; } private function _header() { $h = << Exception caught HEREDOC; return $h; } private function _footer() { return "\n"; } }