mirror of
https://github.com/predis/predis.git
synced 2026-08-30 12:15:03 +00:00
Fix wrong exception being thrown on invalid instance types passed to 'executor'.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user