diff options
author | Richard Leland <rich@richleland.com> | 2016-05-03 21:12:27 -0400 |
---|---|---|
committer | Richard Leland <rich@richleland.com> | 2016-05-03 21:12:27 -0400 |
commit | d96d825aa138af92628ec7311c05e9659917ba79 (patch) | |
tree | c14aab1ebf1d7a50f9b72dce78679e54dd4942e0 /examples/transmission/simple_send.php | |
parent | 48fcc7b0d1eb204a0a49c50f85dde16fbcb5c6b5 (diff) | |
download | php-sparkpost-d96d825aa138af92628ec7311c05e9659917ba79.zip php-sparkpost-d96d825aa138af92628ec7311c05e9659917ba79.tar.gz php-sparkpost-d96d825aa138af92628ec7311c05e9659917ba79.tar.bz2 |
Return extended exception data
* Update examples to show available extra exception methods
* Resolves #83
* Update 403s to pass back extended exception data
Fixes #83
Diffstat (limited to 'examples/transmission/simple_send.php')
-rw-r--r-- | examples/transmission/simple_send.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/examples/transmission/simple_send.php b/examples/transmission/simple_send.php index 08bef9a..5d2d6e3 100644 --- a/examples/transmission/simple_send.php +++ b/examples/transmission/simple_send.php @@ -32,6 +32,8 @@ try { ]); echo 'Congrats! You sent an email using SparkPost!'; } catch (\Exception $exception) { - echo $exception->getMessage(); + echo $exception->getAPIMessage() . "\n"; + echo $exception->getAPICode() . "\n"; + echo $exception->getAPIDescription() . "\n"; } ?> |