SimpleScorer::paintException PHP Method

paintException() public method

Deals with PHP 5 throwing an exception.
public paintException ( Exception $exception )
$exception Exception The actual exception thrown.
    public function paintException($exception)
    {
        $this->exceptions++;
    }

Usage Example

 /**
  * Called when a caught exception needs to be output.
  */
 function paintException($exception)
 {
     // Explicitly call grandparent, not parent::paintException.
     SimpleScorer::paintException($exception);
     $message = 'Unexpected exception of type [' . get_class($exception) . '] with message [' . $exception->getMessage() . '] in [' . $exception->getFile() . ' line ' . $exception->getLine() . ']';
     $stacktrace = null;
     if (method_exists($exception, 'getTrace')) {
         $stacktrace = $exception->getTrace();
     }
     $this->_paintPassFail('exception', $message, $stacktrace);
 }
All Usage Examples Of SimpleScorer::paintException