mirror of
https://github.com/predis/predis.git
synced 2026-09-14 04:17:14 +00:00
Fix server errors handling in Predis\Protocols\FastTextProtocol.
This commit is contained in:
@@ -113,10 +113,11 @@ class FastTextProtocol implements IRedisProtocol {
|
||||
return (int) $payload;
|
||||
|
||||
case '-': // error
|
||||
$errorMessage = substr($payload, 4);
|
||||
if ($this->_throwErrors) {
|
||||
throw new Exception($payload);
|
||||
throw new \Predis\ServerException($errorMessage);
|
||||
}
|
||||
return new Predis\ResponseError($payload);
|
||||
return new \Predis\ResponseError($errorMessage);
|
||||
|
||||
default:
|
||||
throw new CommunicationException(
|
||||
|
||||
Reference in New Issue
Block a user