protected _exception ( Exception $exception, boolean $inEachHook = false ) | ||
$exception | Exception | The catched exception. |
$inEachHook | boolean | Indicates if the exception occurs in a beforeEach/afterEach hook. |
protected function _exception($exception, $inEachHook = false)
{
switch (get_class($exception)) {
case 'Kahlan\\SkipException':
if ($inEachHook) {
$this->log()->type('skipped');
} else {
$this->_skipChildren($exception);
}
break;
default:
$this->_passed = false;
$this->log()->type('errored');
$this->log()->exception($exception);
break;
}
}