PHPUnit_Framework_TestFailure::thrownException PHP Method

thrownException() public method

Gets the thrown exception.
public thrownException ( ) : Exception
return Exception
    public function thrownException()
    {
        return $this->thrownException;
    }

Usage Example

 protected function printDefectTrace(\PHPUnit_Framework_TestFailure $defect)
 {
     $this->write($this->formatExceptionMsg($defect->getExceptionAsString()));
     $trace = \PHPUnit_Util_Filter::getFilteredStacktrace($defect->thrownException());
     if (!empty($trace)) {
         $this->write("\n" . $trace);
     }
     $exception = $defect->thrownException()->getPrevious();
     while ($exception) {
         $this->write("\nCaused by\n" . \PHPUnit_Framework_TestFailure::exceptionToString($e) . "\n" . \PHPUnit_Util_Filter::getFilteredStacktrace($e));
         $exception = $exception->getPrevious();
     }
 }
All Usage Examples Of PHPUnit_Framework_TestFailure::thrownException