TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy

TEAM-ADA@LISTSERV.ACM.ORG

Options: Use Classic View

Use Proportional Font
Show HTML Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender: "Team Ada: Ada Advocacy Issues (83 & 95)" <[log in to unmask]>
From: "W. Wesley Groleau x4923" <[log in to unmask]>
Date: Mon, 26 Feb 2001 12:29:08 -0500
Reply-To: "W. Wesley Groleau x4923" <[log in to unmask]>
Parts/Attachments: text/plain (22 lines)
> Java requires you add certain exception handlers simply to compile, and

It may be even worse than that.  Say you discover that a certain utility
method passes out invalid data if the file containing the valid data
doesn't exist.  This data causes an index out of range far downstream from
the actual error.

The sensible solution, of course, is to check for the file's existence.
But if missing, how do you recover?  Only the unit that made the call has
sufficient information to handle the fact that the file it asked for is
missing.  So we should throw fileNotFound, right?

Only that means you have to track down all the clients of this method and
add the new 'throws' clause.  Or write a less than optimum catcher in the
utility method.

Which fix do you suppose they'll use, the fast one or the right one?

--
Wes Groleau
http://freepages.rootsweb.com/~wgroleau

ATOM RSS1 RSS2