cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From juergen.se...@basf-it-services.com
Subject unroll behavior in the ExceptionSelector
Date Thu, 10 Apr 2003 08:36:03 GMT
Hi,

we propose to change the possible values for attribute "unroll" in the
configuration entries of the new ExceptionSelector from "true" and "false"
to "no", "cause" and "rootcause". This would make it possible to not only
consider a nested exception, but to extract the root exception from
multi-wrapped exceptions.
In other words the decision would be to call method getCause() or
getRootCause() of class ExceptionUtils, that is used inside the selector
even yet.

Example:
Imagine we have wrapped exceptions ProcessingException ?
InvocationTargetException ? NullpointerException. Currently the
ExceptionSelector is only able to consider the ProcessingException and the
InvocationTargetException by:
<map:selector name="exception" class="...">
             <exception name="exc1" class="ProcessingException"/>
             <exception name="exc2" class="InvocationTargetException"
unroll="true"/>
</map:selector>
Our approach would also allow to extract the root cause by:
<map:selector name="exception" class="...">
             <exception name="exc1" class="ProcessingException"/>
             <exception name="exc2" class="InvocationTargetException"
unroll="cause"/>
             <exception name="exc2" class="NullpointerException" unroll
="rootcause"/>
</map:selector>

What do you think about such a change, does it make sense?

Regards, Bjoern (bluetkemeier@s-und-n.de)
and J├╝rgen.


Mime
View raw message