summaryrefslogtreecommitdiffstats
path: root/examples/transmission/simple_send.php
diff options
context:
space:
mode:
authorRichard Leland <rich@richleland.com>2016-05-03 21:12:27 -0400
committerRichard Leland <rich@richleland.com>2016-05-03 21:12:27 -0400
commitd96d825aa138af92628ec7311c05e9659917ba79 (patch)
treec14aab1ebf1d7a50f9b72dce78679e54dd4942e0 /examples/transmission/simple_send.php
parent48fcc7b0d1eb204a0a49c50f85dde16fbcb5c6b5 (diff)
downloadphp-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.php4
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";
}
?>