From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31135 invoked by alias); 14 Nov 2007 22:13:01 -0000 Received: (qmail 31126 invoked by uid 22791); 14 Nov 2007 22:13:01 -0000 X-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DK_POLICY_SIGNSOME,SPF_HELO_PASS,SPF_PASS 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; Wed, 14 Nov 2007 22:12:59 +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 lAEMCvHL015169 for ; Wed, 14 Nov 2007 17:12:57 -0500 Received: from pobox-3.corp.redhat.com (pobox-3.corp.redhat.com [10.11.255.67]) by int-mx1.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAEMCugp003427; Wed, 14 Nov 2007 17:12:56 -0500 Received: from toner.toronto.redhat.com (toner.yyz.redhat.com [10.15.16.55]) by pobox-3.corp.redhat.com (8.13.1/8.13.1) with ESMTP id lAEMCuPQ025299; Wed, 14 Nov 2007 17:12:56 -0500 Message-ID: <473B72E8.50409@redhat.com> Date: Wed, 14 Nov 2007 22:13:00 -0000 From: Sami Wagiaalla User-Agent: Thunderbird 2.0.0.5 (X11/20070727) MIME-Version: 1.0 To: Phil Muldoon CC: frysk@sourceware.org Subject: Re: Frysk exceptions References: <473B67E7.3080902@redhat.com> <473B6EF3.2030307@redhat.com> In-Reply-To: <473B6EF3.2030307@redhat.com> 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/msg00133.txt.bz2 >> * Exceptions should never ever be ignored. > > One of the downsides of a unchecked exception is that one has to have > a good knowledge of the code-base to catch an unchecked exception. The > very nature of unchecked exceptions means they do not have to be > explicitly caught. That means all the usual ecj compiler checks will > not catch any leaks. Not sure what to do here, except that the top > level commands in fhpd/ui need to be very careful of intercepting said > unchecked exceptions. I meant that exceptions should not be swallowed. As in catch(Exception e){//mum} > You can fix this by catching the big unchecked exception superclass > ..................... > >> So no catch(Exception e) statements, but >> catch(SymboleNotFoundException e). > > This drills into the fact that one can expect to catch unchecked > exception foo, but rather unchecked exception bar happens instead > which is uncaught. Caution needs to be exercised that we are not > falling into the checked exception trap, even though the exception is > unchecked. If you start expecting callers to catch various different > forms of unchecked exceptions and creating a policy around that, then > I think we need a bit of a think on strategy. It creates a huge burden > on the caller of the api to have underlying knowledge of the code > beyond that api call. I constantly fall into the trap of writing code > for myself, but not to a wider unsuspecting audience. This is usually > re-factored out, but 5 years from now will user Joe know he has to > catch several different flavors of undeclared, unchecked exceptions? This is a good point. I hadent thought about it before. But, if Joe runs his code and gets a SymboleNotFound exception they can relate that to the function call they made and handle the exception.