Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailer exception unification #13

Closed
wants to merge 5 commits into from

Conversation

SendiMyrkr
Copy link

No description provided.

@@ -0,0 +1,12 @@
<?php
/**
* @author Jan Dvořák <dvorak@spinao.cz>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong license

*
* @author David Grudl
*/
class SmtpException extends SendFailedException
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dědíš to naopak, tohle je špatně, SmtpException je obecnější

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, když teď nad tím tak přemýšlím, tak už chápu proč se to snaží udělat takhle... protože SendFailedException může pak házet i ten sendmail...

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ale pak to nemůžeš poslat v SendMailMaileru a tím to ztrácí smysl, myslel jsem, že bych v SmtpMaileru dal taky tu vyjímku SendFailed ale bude to BC break

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tak udělej interface, něco jako

class SmtpException extends \Exception {}
class SendmailException extends \Exception {}

interface SendFailedException {}
class SmtpSendFailedException extends \Exception implements SendFailedException {}
class SendmailSendFailedException extends \Exception implements SendFailedException {}

(jenom nástřel, je potřeba to domyslet)

@dg dg closed this in 608c85b Jun 29, 2015
dg added a commit that referenced this pull request Jul 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants