Behat\Testwork\Call\CallCenter::handleException PHP Method

handleException() private method

Handles exception using registered handlers and returns a handled one.
private handleException ( Throwable $exception ) : Throwable
$exception Throwable
return Throwable
    private function handleException($exception)
    {
        foreach ($this->exceptionHandlers as $handler) {
            if (!$handler->supportsException($exception)) {
                continue;
            }
            $exception = $handler->handleException($exception);
        }
        if ($exception instanceof Throwable) {
            return new FatalThrowableError($exception);
        }
        return $exception;
    }