Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 34704 invoked from network); 7 Jul 2006 02:08:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 7 Jul 2006 02:08:49 -0000 Received: (qmail 34375 invoked by uid 500); 7 Jul 2006 02:08:46 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 34330 invoked by uid 500); 7 Jul 2006 02:08:46 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 34316 invoked by uid 99); 7 Jul 2006 02:08:46 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jul 2006 19:08:46 -0700 X-ASF-Spam-Status: No, hits=1.9 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 202.81.18.152 is neither permitted nor denied by domain of richard.liangyx@gmail.com) Received: from [202.81.18.152] (HELO ausmtp04.au.ibm.com) (202.81.18.152) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 06 Jul 2006 19:08:43 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp04.au.ibm.com (8.13.6/8.13.5) with ESMTP id k672D5mT211196 for ; Fri, 7 Jul 2006 12:13:05 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.250.237]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.8) with ESMTP id k672BTOx233968 for ; Fri, 7 Jul 2006 12:11:41 +1000 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id k67286PM001516 for ; Fri, 7 Jul 2006 12:08:06 +1000 Received: from d23m0011.cn.ibm.com ([9.181.32.74]) by d23av04.au.ibm.com (8.12.11.20060308/8.12.11) with ESMTP id k6727SLY032427 for ; Fri, 7 Jul 2006 12:08:05 +1000 Received: from [127.0.0.1] ([9.181.106.154]) by d23m0011.cn.ibm.com (Lotus Domino Release 6.5.5HF262) with ESMTP id 2006070710063995-1713 ; Fri, 7 Jul 2006 10:06:39 +0800 Message-ID: <44ADC1AE.2040005@gmail.com> Date: Fri, 07 Jul 2006 10:06:38 +0800 From: Richard Liang User-Agent: Thunderbird 1.5.0.4 (Windows/20060516) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib] Exception throwing compatibility: java.util.Scanner References: <44AD076F.1040708@gmail.com> <44AD22E3.6000900@pobox.com> <200607062053.02282.chris.gray@kiffer.be> In-Reply-To: <200607062053.02282.chris.gray@kiffer.be> X-MIMETrack: Itemize by SMTP Server on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 07/07/2006 10:06:39, Serialize by Router on D23M0011/23/M/IBM(Release 6.5.5HF262 | April 5, 2006) at 07/07/2006 10:08:05 Content-Type: multipart/alternative; boundary="------------090007040308080007060707" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N --------------090007040308080007060707 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Chris Gray wrote: > On Thursday 06 July 2006 16:49, Geir Magnusson Jr wrote: > =20 >> This is a great example. The last two aren't even legal exceptions for >> that method. >> >> It seems like the RI is doing random crap, and it wouldn't be something >> that someone would depend on... can you imagine? >> =20 > > I think we have to distinguish between exceptions like these, which norma= lly=20 > nobody ever sees, unless they are actually writing tests for the core API= s=20 > (or unless they make a major programming blunder - and then they'll fix t= hat=20 > and forget precisely what exception was thrown) on the one hand, and=20 > exceptions which one can reasonably expect to happen sometimes when=20 > developing code which may run in a variety of Java environments. An examp= le=20 > of the latter would be ClassNotFoundException indicating that the runtime= =20 > environment does not contain some wished-for class or package; if the=20 > application programmer builds in a throw..catch clause which implements a= =20 > fallback, then you'd better theow ClassNotFoundException and not some ran= dom=20 > thing like NoClassDefFoundError or NPE. Similarly, I just heard from a=20 > customer that some application was failing because we were throwing=20 > LinkageError when a shared library could not be found, whereas the=20 > application only had a handler for UnsatisfiedLinkError. In this case bot= h=20 > the RI and the spec were in agreement, but I would happily have made the = > change even if the spec had specified LinkageError and the RI was throwin= g=20 > the subclass UnsatisfiedLinkError.=20 > > Fcourse it's not always easy to draw the line between exceptions which=20 > probably represent a programmer error and those which robust programs may= =20 > need to handle, hance there will always be a need to discuss some of thes= e=20 > cases. > > =20 Thanks a lot, Chris. We may frequently encounter this confused situation, and I suggest we=20 discuss the problems case by case if someone is not sure how to do. ;-) For this case, I decide to follow "useRadix(int radix)". Please correct=20 me if I'm wrong. Thanks a lot. Best regards, Richard > Chris > =B5 > =20 --=20 Richard Liang China Software Development Lab, IBM=20 --------------090007040308080007060707--