On Mon, Nov 17, 2008 at 2:28 PM, Oleg Kalnichevski <[EMAIL PROTECTED]> wrote:
> On Mon, 2008-11-17 at 14:15 +0100, Markus Wiederkehr wrote:
>> With MIME4J-77 the decision was made to separate MimeException from
>> IOException and introduce an adapter class MimeIOException which
>> extends IOException. The Message constructor now throws IOException
>> and MimeIOException..
>>
>> I just noticed that Entity.writeTo() still declares IOException and
>> MimeException. I think that should be changed in MimeIOException as
>> well.
>>
>
> Why?
>
> Oleg

Well.. with MIME4J-77 we had a long discussion whether the user should
be forced to catch two exceptions (Mime and IO) or only one (IO) and
whether MimeException should extend IOException or not..

The outcome was that the user should only have to catch one exception
while MimeException and IOException should be decoupled. Hence
MimeIOException.

I think the same arguments that apply to parsing a message should
apply to writing a message. It should require only one catch block.
Again, not my preferred solution but otherwise the API would be
inconsistent.

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to