Closed romaricdrigon closed 8 years ago
Hi @romaricdrigon,
Thanks for this! We could definitely make use of the \Swift_TransportException
. However in the time being you could catch Postmark\Exception
which extends \Exception
for Postmark API errors. Its code is set to the API error code which Postmark uses. https://github.com/OpenBuildings/postmark/blob/a51bb76b79164ef251c4dba48678f37df3ad3d86/src/Exception.php
Definitely, for now I overrode SwiftMailer bundle listener to catch exceptions :)
@romaricdrigon Would you be interested in opening a pull request with this change?
Sure, right away!
Closing issue in favor of PR #28
Hi,
In case of API errors, the mailer throws "regular"
\Exception
. SwiftMailer includes a specific Exception class,\Swift_TransportException
. Only those are catched by various plugins and decorators. Then using those - or extending those to something likePostMarkApiException
would be nice!