cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <sylvain.wal...@anyware-tech.com>
Subject Re: [RT]: InputModules interfaces
Date Tue, 08 Oct 2002 09:01:14 GMT
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

<snip/>

>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


Mime
View raw message