gocardless/gocardless-php — pull request #18 by timrogers (2013-04-23 14:44:24+00:00)
Title: Adds getJson and getResponse method to GoCardless_ApiException

Previously, the `GoCardless_ApiException` exceptions raised by Request.php weren't very helpful as the message contained only the result of calling `print_r` on the JSON.

This actually stores the JSON in the exception object, so you can call `$exception->getJson()` to get the raw JSON returned bu GoCardless, or `$exception->getResponse()` to get a decoded object of it.

resolves issue #13