소스 검색

Fix wrong exception being thrown on invalid instance types passed to 'executor'.

Daniele Alessandri 14 년 전
부모
커밋
b72b12c5cd
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      lib/Predis/Pipeline/PipelineContext.php

+ 4 - 1
lib/Predis/Pipeline/PipelineContext.php

@@ -26,7 +26,10 @@ class PipelineContext {
         if (isset($options['executor'])) {
             $executor = $options['executor'];
             if (!$executor instanceof IPipelineExecutor) {
-                throw new \ArgumentException();
+                throw new \InvalidArgumentException(
+                    'The executor option accepts only instances ' .
+                    'of Predis\Pipeline\IPipelineExecutor'
+                );
             }
             return $executor;
         }