Update v1.0.6.5
This commit is contained in:
@@ -37,10 +37,10 @@ class ReturnArgumentPromise implements PromiseInterface
|
||||
public function __construct($index = 0)
|
||||
{
|
||||
if (!is_int($index) || $index < 0) {
|
||||
throw new InvalidArgumentException(
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Zero-based index expected as argument to ReturnArgumentPromise, but got %s.',
|
||||
$index
|
||||
);
|
||||
));
|
||||
}
|
||||
$this->index = $index;
|
||||
}
|
||||
|
||||
@@ -46,13 +46,13 @@ class ThrowPromise implements PromiseInterface
|
||||
&& !is_subclass_of($exception, 'Exception')) {
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Exception class or instance expected as argument to ThrowPromise, but got %s.',
|
||||
gettype($exception)
|
||||
$exception
|
||||
));
|
||||
}
|
||||
} elseif (!$exception instanceof \Exception) {
|
||||
throw new InvalidArgumentException(sprintf(
|
||||
'Exception class or instance expected as argument to ThrowPromise, but got %s.',
|
||||
gettype($exception)
|
||||
is_object($exception) ? get_class($exception) : gettype($exception)
|
||||
));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user