1
0
mirror of https://github.com/guzzle/guzzle.git synced 2025-02-24 01:53:58 +01:00

Adding JsonException to ignored code coverage files

This commit is contained in:
Michael Dowling 2012-04-25 00:28:02 -07:00
parent ee4529d4b6
commit fb5cd2dc42
2 changed files with 2 additions and 1 deletions

View File

@ -34,6 +34,7 @@
<file>./src/Guzzle/Service/Exception/ServiceBuilderException.php</file>
<file>./src/Guzzle/Service/Exception/ServiceNotFoundException.php</file>
<file>./src/Guzzle/Service/Exception/ValidationException.php</file>
<file>./src/Guzzle/Service/Exception/JsonException.php</file>
</exclude>
</whitelist>
</filter>

View File

@ -280,7 +280,7 @@ abstract class AbstractCommand extends Collection implements CommandInterface
if ($body) {
$decoded = json_decode($body, true);
if (JSON_ERROR_NONE !== json_last_error()) {
throw new JsonException('The response body can not be decoded to json', json_last_error());
throw new JsonException('The response body can not be decoded to JSON', json_last_error());
}
$this->result = $decoded;