Closed jxmallett closed 8 years ago
Could you squash the last 3 commits into one? Ultimately the 1st commit would be a separate PR as it could be released as 0.3.x
. I consider the other changes related to the exception handling to be breaking backwards compatibility as for users who have used the event dispatcher, we haven't been emitting the exceptionThrown
event until now.
For squashing your last 3 commits you could use:
git reset --soft HEAD~3 &&
git commit
or git rebase --interactive
if you know what you are doing.
Thanks for your work on this. Actually using the postmark API makes error handling much easier!
I've added some code to have the
exceptionThrown
Swift event triggered when an error occurs with the API call.In order to catch Swift events, I've also added an option to connect an event listener to the Transport.
In the case of
exceptionThrown
events, the message is added to the Transport so it can be accessed from the event listener.Here's the event listener I use:
Finally, in looking through the code and making my changes, I added leading slashes to some of the namespacing to quiet phpStorm.
Let me know if there's anything you'd like me to change or clarify.