TEAM-ADA Archives

Team Ada: Ada Programming Language Advocacy


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
"W. Wesley Groleau x4923" <[log in to unmask]>
Reply To:
W. Wesley Groleau x4923
Mon, 26 Feb 2001 12:29:08 -0500
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