Aerys\Server::onApplicationError PHP Method

onApplicationError() private method

private onApplicationError ( Throwable $error, InternalRequest $ireq, aerys\Response $response, array $filters )
$error Throwable
$ireq InternalRequest
$response aerys\Response
$filters array
    private function onApplicationError(\Throwable $error, InternalRequest $ireq, Response $response, array $filters)
    {
        $this->logger->error($error);
        if ($ireq->client->isDead & Client::CLOSED_WR || $ireq->client->isExported) {
            // Responder actions may catch an initial ClientException and continue
            // doing further work. If an error arises at this point our only option
            // is to log the error (which we just did above).
            return;
        } elseif ($response->state() & Response::STARTED) {
            $this->close($ireq->client);
        } elseif (empty($ireq->filterErrorFlag)) {
            $this->tryErrorResponse($error, $ireq, $response, $filters);
        } else {
            $this->tryFilterErrorResponse($error, $ireq, $filters);
        }
    }