mirror of
https://github.com/predis/predis.git
synced 2026-08-27 00:59:55 +00:00
41c29bed4e
The "throw_errors" connection parameter has been removed and replaced by the new "exceptions" client option since exceptions on -ERR replies returned by Redis are not generated by connection classes anymore but are thrown by the client class and other abstractions such as pipeline contexts. This change does not affect much people using the Predis\Client class (aside from the different configuration) but gives much more flexibility to those building their own pieces of code around the internal classes of Predis.
38 lines
972 B
PHP
38 lines
972 B
PHP
<?php
|
|
|
|
/*
|
|
* This file is part of the Predis package.
|
|
*
|
|
* (c) Daniele Alessandri <suppakilla@gmail.com>
|
|
*
|
|
* For the full copyright and license information, please view the LICENSE
|
|
* file that was distributed with this source code.
|
|
*/
|
|
|
|
namespace Predis\Protocol\Text;
|
|
|
|
use Predis\ResponseError;
|
|
use Predis\Protocol\ResponseHandlerInterface;
|
|
use Predis\Connection\ComposableConnectionInterface;
|
|
|
|
/**
|
|
* Implements a response handler for error replies using the standard wire
|
|
* protocol defined by Redis.
|
|
*
|
|
* This handler returns a reply object to notify the user that an error has
|
|
* occurred on the server.
|
|
*
|
|
* @link http://redis.io/topics/protocol
|
|
* @author Daniele Alessandri <suppakilla@gmail.com>
|
|
*/
|
|
class ResponseErrorSilentHandler implements ResponseHandlerInterface
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function handle(ComposableConnectionInterface $connection, $errorMessage)
|
|
{
|
|
return new ResponseError($errorMessage);
|
|
}
|
|
}
|