Beispiel #1
0
 /**
  * Render the exception (debug)
  *
  * @param object      $exception
  * @param string|null $outputBuffer
  * @return array title, html
  */
 protected function doRenderDebug($exception, $outputBuffer = null)
 {
     $title = Debug::getExceptionName($exception);
     $extras = '';
     $this->emit('render.debug', array('title' => &$title, 'extras' => &$extras, 'exception' => $exception, 'output_buffer' => $outputBuffer, 'screen' => $this));
     $output = '';
     $chain = Debug::getExceptionChain($exception);
     $totalExceptions = sizeof($chain);
     for ($i = 0; $i < $totalExceptions; ++$i) {
         $output .= $this->renderException($chain[$i], $i, $totalExceptions);
         if (0 === $i) {
             // render extras after the first exception
             $output .= $extras;
             $output .= $this->renderOutputBuffer($outputBuffer);
             $output .= $this->renderPlaintextTrace($exception);
         }
     }
     return array($title, $output);
 }