浏览代码

Use a more appropriate exception.

Daniele Alessandri 11 年之前
父节点
当前提交
35023dd83f
共有 1 个文件被更改,包括 4 次插入2 次删除
  1. 4 2
      lib/Predis/Connection/RedisCluster.php

+ 4 - 2
lib/Predis/Connection/RedisCluster.php

@@ -15,11 +15,11 @@ use ArrayIterator;
 use Countable;
 use IteratorAggregate;
 use OutOfBoundsException;
-use Predis\ClientException;
 use Predis\NotSupportedException;
 use Predis\Cluster;
 use Predis\Command\CommandInterface;
 use Predis\Command\RawCommand;
+use Predis\Protocol;
 use Predis\Response;
 
 /**
@@ -409,7 +409,9 @@ class RedisCluster implements ClusterConnectionInterface, IteratorAggregate, Cou
                 return $response;
 
             default:
-                throw new ClientException("Unexpected request type for a move request: $request");
+                throw new Protocol\ProtocolException(
+                    "Unexpected request type for a move request: $request"
+                );
         }
     }