From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2056 invoked by alias); 16 Nov 2007 14:32:34 -0000 Received: (qmail 2045 invoked by uid 22791); 16 Nov 2007 14:32:33 -0000 X-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS,TW_FH X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 16 Nov 2007 14:32:28 +0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.13.8/8.13.1) with ESMTP id lAGEWOPY005172; Fri, 16 Nov 2007 09:32:24 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [10.11.255.20]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAGEWOTU018563; Fri, 16 Nov 2007 09:32:24 -0500 Received: from [127.0.0.1] (sebastian-int.corp.redhat.com [172.16.52.221]) by pobox.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAGEWNq9009207; Fri, 16 Nov 2007 09:32:23 -0500 Message-ID: <473DA9B0.10901@redhat.com> Date: Fri, 16 Nov 2007 14:32:00 -0000 From: Andrew Cagney User-Agent: Thunderbird 1.5.0.12 (X11/20070530) MIME-Version: 1.0 To: Mark Wielaard CC: Phil Muldoon , frysk@sourceware.org Subject: Re: fhpd vs RuntimeExceptions References: <1195050364.3027.24.camel@dijkstra.wildebeest.org> <473C7B74.6090109@redhat.com> <1195149852.3010.33.camel@dijkstra.wildebeest.org> <473C985F.6010103@redhat.com> <1195208888.3001.24.camel@dijkstra.wildebeest.org> In-Reply-To: <1195208888.3001.24.camel@dijkstra.wildebeest.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact frysk-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: frysk-owner@sourceware.org X-SW-Source: 2007-q4/txt/msg00154.txt.bz2 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 <>, 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