Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 43884 invoked by uid 500); 8 Oct 2002 09:00:18 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 43873 invoked from network); 8 Oct 2002 09:00:17 -0000 Message-ID: <3DA29EDA.7090502@anyware-tech.com> Date: Tue, 08 Oct 2002 11:01:14 +0200 From: Sylvain Wallez Organization: Anyware Technologies User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: fr, en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [RT]: InputModules interfaces References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Carsten Ziegeler wrote: >Sylvain Wallez wrote: > > >>>>But why throwing a ProcessingException ? Simply throwing Exception would avoid exception cascading (I hate these never ending stacktraces) and better cope with the variety of implementations. >>>> >>>Valid question...now the question is: where do you want to handle the >>>exception? >>> >>Back to the exception handling stragegy ;-) >> >Yuppy! > ;-P >But if you have a method indicating that it throws a ProcessingException >and it calls a method which simply throws Exception than you have to >do something like this: >try { > inputmodule.method(); >} catch (ProcessingException pe) { > // rethrow > throw pe; >} catch (Exception e) { > throw new ProcessingException(e); >} > You should also add (damn, I'm picky today) : catch (RuntimeException re) { throw re; } >And there are some important (= high level) classes which indicate >to throw ProcessingException - that's all. > Granted. But is InputModule to be considered "high level" ? >Apart from that just Exception is too specific for me, but I guess >that's my personal problem here. > >Ok, you say "Exception", I say "ProcessingException" - the next one >in this thread apart from us two can decide which one to use :) > > ;-) Sylvain -- Sylvain Wallez Anyware Technologies Apache Cocoon http://www.anyware-tech.com mailto:sylvain@apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org