diff --git a/lib/Predis.php b/lib/Predis.php index 8ea222e5..c20beadd 100644 --- a/lib/Predis.php +++ b/lib/Predis.php @@ -711,7 +711,7 @@ class CommandPipeline { public function execute($block = null) { if ($block && !is_callable($block)) { - throw new \RuntimeException('Argument passed must be a callable object'); + throw new \InvalidArgumentException('Argument passed must be a callable object'); } // TODO: do not reuse previously executed pipelines @@ -779,7 +779,7 @@ class MultiExecBlock { public function execute($block = null) { if ($block && !is_callable($block)) { - throw new \RuntimeException('Argument passed must be a callable object'); + throw new \InvalidArgumentException('Argument passed must be a callable object'); } $blockException = null;