gnu-arch-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnu-arch-users] Re: [OT] Java is fun!


From: Dustin Sallings
Subject: Re: [Gnu-arch-users] Re: [OT] Java is fun!
Date: Wed, 22 Oct 2003 14:35:04 -0700


On Wednesday, Oct 22, 2003, at 13:49 US/Pacific, address@hidden wrote:

On Wed, Oct 22, 2003 at 11:21:07AM -0700, Tom Lord wrote:
...
otherwise, what about the unfortunate caller who has code:

                try {
                  List lines=Reader.getLinesOfFile(fileName);
                  Answer a=Parser.parseLines(lines);
                } catch (IOException e) {
                  ...
                } catch (ParserException e) {
                  ...
                }
Hey, who _really_ raised that ParserException?

Stop bashing java, you obviously have no idea what you are talking about and are basically making a fool of yourself; your expertise is somewhere
else; take the ideas you like and walk away.

        I think a nicer and more accurate answer is something like this:

If it really makes a difference to you (and if it did, you might structure differently), you ask the exception for its stack trace, which will tell you all of the stack frames leading up to the exception that occurred. This will include the call to either getLinesOfFile or parseLines, what they called, what they called, etc... and all of the stuff in the other direction up to the start of the thread.

Tom is bringing up some valid theoretical points, but I don't think they come up very often in practice.

I think there are lessons to be learned here for everyone. Some things may not work quite as well as some people expect in certain cases, nor as poorly as others expect. I still believe that the failures that have been cited so far will, at worst, provide misleading error messages when a failure occurs rather than causing the types of problems we've seen in various persistent applications written in C over the years.

--
Dustin Sallings





reply via email to

[Prev in Thread] Current Thread [Next in Thread]