Predis\Pipeline\Pipeline::exception PHP Method

exception() protected method

Throws an exception on -ERR responses returned by Redis.
protected exception ( Predis\Connection\ConnectionInterface $connection, Predis\Response\ErrorInterface $response )
$connection Predis\Connection\ConnectionInterface Redis connection that returned the error.
$response Predis\Response\ErrorInterface Instance of the error response.
    protected function exception(ConnectionInterface $connection, ErrorResponseInterface $response)
    {
        $connection->disconnect();
        $message = $response->getMessage();
        throw new ServerException($message);
    }