HtmlReporter::paintException PHP Method

paintException() public method

Paints a PHP exception.
public paintException ( Exception $exception )
$exception Exception Exception to display.
    public function paintException($exception)
    {
        parent::paintException($exception);
        print '<span class="fail">Exception</span>: ';
        $breadcrumb = $this->getTestList();
        array_shift($breadcrumb);
        print implode(' -&gt; ', $breadcrumb);
        $message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
        print ' -&gt; <strong>' . $this->htmlEntities($message) . "</strong><br />\n";
    }

Usage Example

 function paintException($exception)
 {
     parent::paintException($exception);
     echo '<pre>' . $exception->getTraceAsString() . '</pre>';
 }
All Usage Examples Of HtmlReporter::paintException