This is the mail archive of the frysk@sourceware.org mailing list for the frysk project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fhpd vs RuntimeExceptions


Mark Wielaard wrote:
Hi Andrew,

On Thu, 2007-11-15 at 14:05 -0500, Andrew Cagney wrote:
That unfortunatly isn't sufficient; the old code in CLI.java was differentiating between and NPE and other exceptions - dumping the stack when an NPE occured. I'll restore this behavior; so we're at least back to a usable status quo (and from a HPD user prospective in a better position - these back-traces plain suck)

OK, but I don't understand this heuristic with NullPointerException. You introduced a "nasty()" method (cute name) that gobbles up the Exception except if it is a NullPointerException or has an empty message. But that doesn't seem to cover other catastrophic failures like ClassCastException, ArrayOutOfBoundsException, ArithmeticException, IllegalArgumentException or NumberFormatException, etc. that might or might not have empty messages, but that are real core bugs if they occur and "bubble up" to the CLI.

True, it gets rid of the immediate problem. More importantly it lets us walk away from this bike shed and focus on more critical - a corrupt variable or wrong back-trace is far more serious than the exact text of an error message. Just like how the dog hears in the farside cartoon <<Rover, blah blah blah ...>>, we've ensured that the user at least sees "Error: ". As our user base expands we can refine this.

[...]

That seems fine. I recommend you also just rip out the whole Message queuing structure and handle that in the same way with a simple printMessage(). Having two different mechanisms for creating user feedback in the CLI is probably confusing.

Of course; however the cli code base is still in rehab from me refactoring N ways of implementing a command down to one.
Can you create a bug?


Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]