commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <ggreg...@seagullsw.com>
Subject RE: [codec] DecoderException superclass [WAS: StatefulDecoders]
Date Tue, 24 Feb 2004 03:42:56 GMT
So a nice simplification would be to replace De/EncoderException usage with
IOException. I am not sure this is 100% backwards compatible though.

For [codec], this involves:

(1) Deprecate De/EncoderException.
(2) Replace throw in API declaration and in throw sites with IOException.

For [codec] clients: this means that call sites will have to change from
catching De/EncoderException to catching IOException.

Even if we were to make De/EncoderException subclass IOException and
deprecated, this does not solve the issue of call sites needing to change
their catch clauses.

Is this type of API breakage acceptable?

Gary

> -----Original Message-----
> From: Tim O'Brien [mailto:tobrien@discursive.com]
> Sent: Monday, February 23, 2004 19:31
> To: Jakarta Commons Developers List
> Subject: Re: [codec] DecoderException superclass [WAS: StatefulDecoders]
> 
> I think the introduction of EncoderException and DecoderException in and
> of itself was a mistake in the first place.  Creating hierarchies of
> exception just for the hell of it isn't a hobby I can maintain.
> 
> IMO, Encoder and Decoder are similar to Reader and Writer which both
> throw IOException.
> 
> Tim
> 
> 
> Gary Gregory wrote:
> > It also makes me wonder why De/EncoderException do not subclass a
> > "CoderException", CodecException? Just thinking aloud...
> >
> > gg
> >
> >
> >>-----Original Message-----
> >>From: Tim O'Brien [mailto:tobrien@discursive.com]
> >>Sent: Monday, February 23, 2004 18:00
> >>To: Jakarta Commons Developers List
> >>Subject: Re: [codec] DecoderException superclass [WAS: StatefulDecoders]
> >>
> >>Gary Gregory wrote:
> >>
> >>>Alex suggests below that IOException would also make sense.
> >>>
> >>>Opinions?
> >>
> >>I'm don't have strong feelings either way.  If EncoderException were to
> >>extend IOException, or if Encoders threw IOExceptions instead of
> >>EncoderException.  Encoder and Decoder were experiments, most people who
> >>use Codec instantiate an object like Base64 or Soundex directly.  If
> >>these interfaces and exceptions need to evolve, let's do it.
> >>
> >>Tim
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message