tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Chaffee <g...@edamame.stinky.com>
Subject Re: IOException API proposal
Date Wed, 14 Jun 2000 23:35:37 GMT
Great proposal, not sure what it's doing here... :-)

> > What's really needed is for java developers to to be much more aggressive
> > about subclassing the existing excepion classes.
> > 
> 
> In general I agree with you, however if you can get 40 different
> exception, I think people start complaining. 

If you have 40 different error recovery algorithms, then you'll need
40 different catch blocks. But more likely you'll catch one or two
subclasses then finish off with "catch (IOException e)" as usual.

> But subclassing also mean a
> standard body (JCP) should define all these Exceptions and that the
> people implementing a JVM should map these on the underlying native
> libraries.

Yes! This is actually something Sun will never get around to doing,
and a standards body would. Patching all the little bitty holes and
inconsistencies, and then forcing VM implementors to be consistent at
the small level.  I'd love it if Sun worked with a standards body for
the small stuff, and kept control of the large and creative parts via
the JCP.

> 
> An advantage of aggressive subclassing exceptions would be the explicit
> declaration of these exceptions. But as their number will be high,
> nobody is going to declare these and therefore they just use the common
> superclass.

Right, and that's as it should be. One catch block per recovery branch.


-- 
Alex Chaffee                       mailto:alex@jguru.com
jGuru - Java News and FAQs         http://www.jguru.com/alex/
Creator of Gamelan                 http://www.gamelan.com/
Founder of Purple Technology       http://www.purpletech.com/
Curator of Stinky Art Collective   http://www.stinky.com/

Mime
View raw message