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:[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]