Fix and reword some exception messages.

This commit is contained in:
Daniele Alessandri
2013-12-16 13:17:45 +01:00
parent 43f278fb71
commit 0f34f41ccf
70 changed files with 172 additions and 180 deletions
+5 -5
View File
@@ -75,7 +75,7 @@ class Client implements ClientInterface
return $options;
}
throw new InvalidArgumentException("Invalid type for client options");
throw new InvalidArgumentException("Invalid type for client options.");
}
/**
@@ -134,7 +134,7 @@ class Client implements ClientInterface
return $connection;
}
throw new InvalidArgumentException('Invalid type for connection parameters');
throw new InvalidArgumentException('Invalid type for connection parameters.');
}
/**
@@ -151,7 +151,7 @@ class Client implements ClientInterface
if (!$connection instanceof ConnectionInterface) {
throw new UnexpectedValueException(
'The callable connection initializer returned an invalid type'
'The callable connection initializer returned an invalid type.'
);
}
@@ -185,7 +185,7 @@ class Client implements ClientInterface
public function getClientFor($connectionID)
{
if (!$connection = $this->getConnectionById($connectionID)) {
throw new InvalidArgumentException("Invalid connection ID: $connectionID");
throw new InvalidArgumentException("Invalid connection ID: $connectionID.");
}
return new static($connection, $this->options);
@@ -247,7 +247,7 @@ class Client implements ClientInterface
{
if (!$this->connection instanceof AggregateConnectionInterface) {
throw new NotSupportedException(
'Retrieving connections by ID is supported only when using aggregate connections'
'Retrieving connections by ID is supported only by aggregate connections.'
);
}