[MERGE] An SMTPConnection class for bzrlib

John Arbash Meinel john at arbash-meinel.com
Wed Jun 20 01:29:41 BST 2007

Hash: SHA1

Aaron Bentley wrote:
> Adeodato Simó wrote:
>>> I think it would make sense to just let the smtplib errors pass
>>> through.
>> I agree with John here, and don't think it's nice for the user to get a
>> traceback if some step in the SMTP dialog fails.
> Responsibility for preventing a traceback should be taken at a higher
> level, not here.
>> A single-line error
>> would be nicer, IMHO. I'll go ahead and create an SMTPError class if you
>> don't object, okay?
> It's okay if you make it an internal error so that an unhandled one does
> generate a traceback.
> Aaoron

I think it is entirely reasonable for "AuthenticationFailure" to be raised from
here without a full traceback. Otherwise any command that wants to send an
email needs to trap it and re-raise a BzrCommandError.

I think it depends on what the specific error is, as to why it would/would not
be handled here.

While we *can* trap and re-raise, it breaks the tracebacks. Which often is a
problem when we *think* we are handling an exception properly, but turn out to
be wrong.

I suppose a different possibility would be to have the wrapping code log the
current traceback, and then re-raise. (I *really* appreciate our
always-log-the-traceback code when users have problems on IRC).

Version: GnuPG v1.4.7 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org


More information about the bazaar mailing list