Example #1
0
 /**
  * Renders a basic error response
  */
 private function _renderDefault()
 {
     $data = $this->_getOutputData(true);
     $data = $this->filterEvent('renderDefault', $data);
     $html = trim('
     <!DOCTYPE html>
     <html>
     <head>
         <title>' . $this->_error_type . '</title>
         <meta charset="utf-8" />
         <meta name="viewport" content="width=device-width, initial-scale=1.0" />
         <meta name="description" content="' . $this->_error_message . '" />
         <meta name="robots" content="none" />
     </head>
     <body style="margin: 0; padding: 0; font-size: 14px; line-height: 20px; font-family: monaco, monospace;">
         <div style="margin: 20px; padding: 20px;">
             <h1>' . $this->_status_code . ': ' . $this->_error_type . '</h1>
             <h3 style="color: #930">' . $this->_error_message . '</h3>
             <pre style="padding: 20px; background: #ffd;">' . print_r($data, true) . '</pre>
         </div>
     </body>
     </html>');
     $response = new Response();
     $response->setHtml($this->_status_code, $html);
     $response->send();
     exit;
 }