diff options
Diffstat (limited to 'Postman/Postman-Mail/sendgrid-php-3.2.0/lib/SendGrid/Exception.php')
-rw-r--r-- | Postman/Postman-Mail/sendgrid-php-3.2.0/lib/SendGrid/Exception.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Postman/Postman-Mail/sendgrid-php-3.2.0/lib/SendGrid/Exception.php b/Postman/Postman-Mail/sendgrid-php-3.2.0/lib/SendGrid/Exception.php new file mode 100644 index 0000000..9fc26e2 --- /dev/null +++ b/Postman/Postman-Mail/sendgrid-php-3.2.0/lib/SendGrid/Exception.php @@ -0,0 +1,14 @@ +<?php + +namespace SendGrid; + +/** + * An exception thrown when SendGrid does not return a 200 + */ +class Exception extends \Exception +{ + public function getErrors() + { + return json_decode($this->message)->errors; + } +} |