You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Markus Wiederkehr <ma...@gmail.com> on 2008/11/17 14:15:19 UTC

[mime4j] Reopen MIME4J-77?

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.

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [mime4j] Reopen MIME4J-77?

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Mon, Nov 17, 2008 at 9:20 PM, Oleg Kalnichevski <ol...@apache.org> wrote:
>> ...
>
> Done. Please review.

Looks good, thanks!

Markus

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [mime4j] Reopen MIME4J-77?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2008-11-17 at 15:10 +0100, Oleg Kalnichevski wrote:
> On Mon, 2008-11-17 at 14:42 +0100, Markus Wiederkehr wrote:
> > On Mon, Nov 17, 2008 at 2:28 PM, Oleg Kalnichevski <ol...@apache.org> 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.
> > 
> 

Done. Please review.

Oleg

> OK. Makes sense. I can take care of that.
> 
> Oleg
> 
> > Markus
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> > For additional commands, e-mail: server-dev-help@james.apache.org
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [mime4j] Reopen MIME4J-77?

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Mon, 2008-11-17 at 14:42 +0100, Markus Wiederkehr wrote:
> On Mon, Nov 17, 2008 at 2:28 PM, Oleg Kalnichevski <ol...@apache.org> 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.
> 

OK. Makes sense. I can take care of that.

Oleg

> Markus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [mime4j] Reopen MIME4J-77?

Posted by Markus Wiederkehr <ma...@gmail.com>.
On Mon, Nov 17, 2008 at 2:28 PM, Oleg Kalnichevski <ol...@apache.org> 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: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Re: [mime4j] Reopen MIME4J-77?

Posted by Oleg Kalnichevski <ol...@apache.org>.
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

> Markus
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
> For additional commands, e-mail: server-dev-help@james.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org