Return-Path: Delivered-To: apmail-commons-dev-archive@www.apache.org Received: (qmail 25164 invoked from network); 6 Jul 2010 09:21:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 6 Jul 2010 09:21:31 -0000 Received: (qmail 40664 invoked by uid 500); 6 Jul 2010 09:21:30 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 40088 invoked by uid 500); 6 Jul 2010 09:21:27 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 40080 invoked by uid 99); 6 Jul 2010 09:21:26 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 09:21:26 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [193.74.71.28] (HELO sif.is.scarlet.be) (193.74.71.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Jul 2010 09:21:16 +0000 Received: from mail.harfang.homelinux.org (ip-62-235-226-49.dsl.scarlet.be [62.235.226.49]) by sif.is.scarlet.be (8.14.2/8.14.2) with ESMTP id o669Kr4n000802 for ; Tue, 6 Jul 2010 11:20:53 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=scarlet.be; s=scarlet; t=1278408054; bh=Aty2FpcttDH0c0tO4y0f0l/2mRNGhCk9RbkHeKuns2A=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=KZGN39v0Wg6UQEK7z7UjYODra5J0MoLwzbD1GVK1eqOMfyhOcM7cwisMz4aaJByFn 2Ea7m1MPPFKEEJ5lIef77nYjOmXSMMrUNwZWr0BBEOCnOlwseKvVlpqyY+C8hrcCdP cFhhHld/23jNZ5a5oJ01bsTHGIOJ9H/qY3VGL84o= Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 3DEF0617AD for ; Tue, 6 Jul 2010 11:20:53 +0200 (CEST) Received: from mail.harfang.homelinux.org ([192.168.20.11]) by localhost (mail.harfang.homelinux.org [192.168.20.11]) (amavisd-new, port 10024) with ESMTP id ZWJ3sgJjp3D2 for ; Tue, 6 Jul 2010 11:20:51 +0200 (CEST) Received: from dusk.harfang.homelinux.org (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 0FAFB6175A for ; Tue, 6 Jul 2010 11:20:50 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.71) (envelope-from ) id 1OW4Kg-00088b-JR for dev@commons.apache.org; Tue, 06 Jul 2010 11:20:50 +0200 Date: Tue, 6 Jul 2010 11:20:49 +0200 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: svn commit: r960602 - in /commons/proper/math/trunk/src: main/java/org/apache/commons/math/analysis/interpolation/ main/java/org/apache/commons/math/exception/ main/java/org/apache/commons/math/util/ main/resources/META-INF/localization/ site/xdoc/ tes... Message-ID: <20100706092049.GA28835@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <20100705141011.CAF1023889E1@eris.apache.org> <4C31FBBD.8060302@gmail.com> <20100705223146.GL6681@dusk.harfang.homelinux.org> <4C327EEA.9080304@gmail.com> <4C32DE2C.6070702@free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4C32DE2C.6070702@free.fr> X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.20 (2009-06-14) X-DCC-scarlet.be-Metrics: sif 20001; Body=1 Fuz1=1 Fuz2=1 X-Virus-Checked: Checked by ClamAV on apache.org > >> The stack trace certainly will show where the bad thing happened. > >> Nothing important is lost: What went wrong is as clearly identified by > >> saying > >> "The argument must be >= 2" > >> as by saying > >> "The number of points must be >= 2" > >> The problem is that the caller passed a wrong argument and this is a bug and > >> no amount of detailed message will be a substitute for reading the > >> documentation and source code and make the correct call. > > > > Sorry, but I disagree here. There is definitely loss of information > > in the stack trace. I would prefer to retain the detailed error > > I also disagree with Gilles, but not the same reason. Some people will > not have access to the stack trace. It is even more important for > unchecked exception since they may not be intercepted by high level > applications. All they will get is a terse message print on a log file > or a popup window before the application stops. > > Users are not here to debug the code for developers. > > Also the Apache license allows people to reuse our code in proprietary > environment with closed source. For sure in this case, no stack trace > will be available. > > Luc And I disagree with both your disagreements. Could you _please_ answer all the drawbacks of your approach in several scenarios which I've put forward many times already, instead of always only cling to the one use-case which you are interested in? Please! What kind of ?@#! application is it that you take as an example, that will print a terse message and exit? The _least_ a program should do when it bails out is print the stack trace! Please! Read chapter 8 of Bloch's Effective Java (less then 20 pages) to see that indeed the error message must be reported by the user/operator to the developer. This is not debugging. > > message that tells what quantity was "too small." And I do not > > really see the value in the "NumberTooSmallException" altogether, > > frankly. By substituting an exception that does not identify what > > quantity was "too small" for an IllegalArgumeentException with a > > message giving the full context, what exactly have we achieved? Then perhaps you missed some of the comments here above, and also at https://issues.apache.org/jira/browse/MATH-195 and/or at https://issues.apache.org/jira/browse/MATH-361 and references therein (Bloch, Goetz). Or perhaps we (Eckel et al.) are all wrong. In this case, please show me modern, high-profile, Java library projects that deal with exceptions in the same way that you want it for CM. Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org