Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 65ED07D36 for ; Thu, 22 Sep 2011 14:41:40 +0000 (UTC) Received: (qmail 24536 invoked by uid 500); 22 Sep 2011 14:41:40 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 24235 invoked by uid 500); 22 Sep 2011 14:41:39 -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 24226 invoked by uid 99); 22 Sep 2011 14:41:39 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Sep 2011 14:41:39 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.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; Thu, 22 Sep 2011 14:41:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=scarlet.be; s=scarlet; t=1316702470; bh=mHX+kOVwUERFVfNwFdsv4GjTjW6TcWB1f6pTA2D5dbs=; h=Date:From:To:Subject:Message-ID:References:MIME-Version: Content-Type:In-Reply-To; b=QRdmfHP7VktnMVlogahpn6rTKZqx6RixfA5F2MqucGC4ZZkTgZ4lGCzteLMGfdlBU fmbH882LuEeG3yuL6IFedvP1r2bdhwLuuZ/fMEUbNgnW8BZtGuzDHqkhfYAeWHNWFZ iooq2yUBI8qtBrbzPgsD4iLThLEaDxIkR4OCoteo= Received: from mail.harfang.homelinux.org (ip-213-49-250-202.dsl.scarlet.be [213.49.250.202]) by sif.is.scarlet.be (8.14.5/8.14.5) with ESMTP id p8MEf9fe009430 for ; Thu, 22 Sep 2011 16:41:10 +0200 X-Scarlet: d=1316702470 c=213.49.250.202 Received: from localhost (mail.harfang.homelinux.org [192.168.20.11]) by mail.harfang.homelinux.org (Postfix) with ESMTP id 7FB64617E9 for ; Thu, 22 Sep 2011 16:41:09 +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 SFrd9bWvc3lI for ; Thu, 22 Sep 2011 16:41:03 +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 752B1617E5 for ; Thu, 22 Sep 2011 16:41:03 +0200 (CEST) Received: from eran by dusk.harfang.homelinux.org with local (Exim 4.76) (envelope-from ) id 1R6kSV-0008DN-Az for dev@commons.apache.org; Thu, 22 Sep 2011 16:41:03 +0200 Date: Thu, 22 Sep 2011 16:41:02 +0200 From: Gilles Sadowski To: dev@commons.apache.org Subject: Re: [Math] MathUtils.checkOrder Message-ID: <20110922144102.GN2590@dusk.harfang.homelinux.org> Mail-Followup-To: dev@commons.apache.org References: <20110921225619.GC17021@dusk.harfang.homelinux.org> <4E7A8448.2010909@gmail.com> <4E7A8EF0.3040009@gmail.com> <20110922133908.GM2590@dusk.harfang.homelinux.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: Tiny Tux X-PGP-Key-Fingerprint: 53B9 972E C2E6 B93C BEAD 7092 09E6 AF46 51D0 5641 User-Agent: Mutt/1.5.21 (2010-09-15) X-DCC-scarlet.be-Metrics: sif 20001; Body=1 Fuz1=1 Fuz2=1 X-Virus-Scanned: clamav-milter 0.97.1-exp at sif X-Virus-Status: Clean X-Virus-Checked: Checked by ClamAV on apache.org On Thu, Sep 22, 2011 at 08:58:19AM -0500, Greg Sterijevski wrote: > I agree with your assessment that having almost identical methods is a pain. > However, without doing this I need to return a very complicated set of > information from isMonotone to be able to construct the exception. Yes, this would be ugly indeed. > As for catching the exception, I was under the impression that CM code never > catches exceptions, you propagate them upwards on the call tree. I think that you refer to not catching user-generated exceptions. Here the example was given that the caller (a CM method) could decide which exception to throw whenever "isMonotone" returns false. My preference is to always throw the same exception (i.e. an instance of "NonMonoton(e/ic/ous)SequenceException"). However if there is a case where the caller would want to throw another one, I'd thought that it would be clearer to catch and rethrow. Well, that's ugly too; in the end, I think we should stick to "NonMonoton(e/ic/ous)SequenceException". :-) > In thinking about this, maybe you are correct. The exception could be > pruned. I am reticent to do this because it looks like exceptions and > exception reporting are sore subjects on for the developers on this > project? Yes. It used to always be "We want all the details". But then there is also the recent example of "NotPositiveDefiniteMatrixException" where the "threshold" is considered too much detail... Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org