From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20925 invoked by alias); 15 Nov 2007 18:46:15 -0000 Received: (qmail 20916 invoked by uid 22791); 15 Nov 2007 18:46:14 -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; Thu, 15 Nov 2007 18:46:10 +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 lAFIk7uP017572; Thu, 15 Nov 2007 13:46:07 -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 lAFIk6A0002280; Thu, 15 Nov 2007 13:46:06 -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 lAFIk5Me021544; Thu, 15 Nov 2007 13:46:06 -0500 Message-ID: <473C93A5.6080609@redhat.com> Date: Thu, 15 Nov 2007 18:46: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> <1195148516.3010.27.camel@dijkstra.wildebeest.org> In-Reply-To: <1195148516.3010.27.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/msg00141.txt.bz2 Mark Wielaard wrote: > > By using different exception types, so a higher level can distinquish > between a "recoverable" warning and a "unrecoverable" error. > > >> Take this example. I manufactured this warning to happen, but all the >> message is telling the user is that it cannot read at the peek() address >> given. It's not an error, just a cannot do. But the huge ugly backtrace >> that follows is not very useful. >> >> (fhpd) core /home/pmuldoon/core.12463 /bin/bash >> Internal debugger error: peek() at address 6992f8 cannot be found in >> metadata table. >> java.lang.RuntimeException: peek() at address 6992f8 cannot be found in >> metadata table. >> at frysk.proc.dead.CorefileByteBuffer.peek(fhpd) >> at inua.eio.ByteBuffer.peek(fhpd) >> at inua.eio.ByteBuffer.peekFully(fhpd) >> at inua.eio.ByteBuffer.peekLittle(fhpd) >> at inua.eio.ByteBuffer.peekLittle(fhpd) >> at inua.eio.ByteOrdered$2.peekULong(fhpd) >> at inua.eio.ByteBuffer.getULong(fhpd) >> at inua.eio.WordSized$3.getUWord(fhpd) >> at inua.eio.ByteBuffer.getUWord(fhpd) >> at frysk.proc.dead.LinuxProc.sendrecMaps(fhpd) >> at frysk.proc.Proc.getMaps(fhpd) >> at frysk.dwfl.DwflFactory.updateDwfl(fhpd) >> at frysk.dwfl.DwflCache.getDwfl(fhpd) >> at frysk.debuginfo.DebugInfoFrame.getScopes(fhpd) >> at frysk.debuginfo.DebugInfoStackFactory.createVirtualStackTrace(fhpd) >> at frysk.hpd.CoreCommand.interpret(fhpd) >> at frysk.hpd.ParameterizedCommand.interpret(fhpd) >> at frysk.hpd.MultiLevelCommand.interpret(fhpd) >> at frysk.hpd.CLI.execCommand(fhpd) >> at frysk.bindir.fhpd.main(fhpd) >> >> If this is the way forward, I'll have to gobble exceptions locally in >> CoreCommand, and just deal with them locally. >> > > Yes, I think that is the way forward. Er, no. We're not going to make all commands gobble all exceptions locally. It's a loosing battle. And we've far more important battles to be focused on right now. > Something terribly failed. And > just passing the "address 6992f8 cannot be found in metadata table." > message to the user is clearly not very helpful if the user just wanted > to run a specific command. Only the command knows if this is something > fatal or not and should catch it at the appropriate level and report > what the exact action was that was attempted and which structure > couldn't be created because of the error. > > Cheers, > > Mark > >