Zend\Stratigility\Middleware\ErrorHandler::handleThrowable PHP Method

handleThrowable() private method

Passes the error, request, and response prototype to createErrorResponse(), triggers all listeners with the same arguments (but using the response returned from createErrorResponse()), and then returns the response.
private handleThrowable ( Throwabl\Throwable | Exceptio\Exception $e, Psr\Http\Message\ServerRequestInterface $request ) : Psr\Http\Message\ResponseInterface
$e Throwabl\Throwable | Exceptio\Exception
$request Psr\Http\Message\ServerRequestInterface
return Psr\Http\Message\ResponseInterface
    private function handleThrowable($e, ServerRequestInterface $request)
    {
        $generator = $this->responseGenerator;
        $response = $generator($e, $request, $this->responsePrototype);
        $this->triggerListeners($e, $request, $response);
        return $response;
    }