[Kaffe] java.io.File(Input|Output)Stream question.

Archie Cobbs archie at whistle.com
Sun Feb 14 14:14:06 PST 1999


Alexandre Oliva writes:
> > On Fri, 12 Feb 1999, Patrick Tullmann wrote:
> >> > The problem is that they throw a FileNotFoundException. The correct
> >> > thing to do in this case is to throw an IOException.
> 
> > Do you have a better idea?
> 
> Subclass FileNotFoundException as kaffe.io.UnreadableFileException and 
> throw it in this case.  Unless someone expects exception.getClass() to 
> return FileNotFoundException.class, this is completely backward
> compatible.

Is that really necessary? I mean, the bottom line is that if somebody
gets an unexpected exception they're going to look at the ASCII message
for the details, and this will show the realy problem either way. It
doesn't really matter what the class is.

On the other hand, if a human is not involved, then again it doesn't
matter what the class is..it's more important to do what Sun does.

IMHO being bug-compatible with Sun is both easier and ultimately
more successful for kaffe's 'customers' than trying to incompatibly
outsmart and/or engineer around deficiencies in their design.

-Archie

___________________________________________________________________________
Archie Cobbs   *   Whistle Communications, Inc.  *   http://www.whistle.com


More information about the kaffe mailing list