Display human friendly error messages.
Display human friendly error messages.

The `ClientException` class always return an error message that is made out of a string, combined with an json_encode object (the output of `curl_error()`. For example: 

```
Unexpected result 403: {"code":403,"message":"Permission denied: This API key does not have the required permissions to perform this operation, you may need to adjust the app configuration"}
```

This makes it very hard to display a user friendly error message to the end user. Think it should either be a fully formatted string or a valid JSON encoded object. In this pull request I chose for the latter. I also added the `$code` param to the construct of the native PHP Exception object.

You could also wonder if it's still necessary to use a custom Exception class, since it doesn't add any functionality to the native Exception class.
ticketmatic/tm-php