cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sylvain Wallez <>
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 the question is: where do you want to handle the
>>Back to the exception handling stragegy ;-)



>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 Wallez
  Anyware Technologies                  Apache Cocoon 

To unsubscribe, e-mail:
For additional commands, email:

View raw message