Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0
-
None
-
None
-
Operating System: other
Platform: Other
-
34402
Description
Since Command can throw exception, would it be more correct for DispatchCommand
to extract the source exception when the dispatch operation throws an
InvocationTargetException?
This comes into play, for example, when you want to use a DispatchCommand in
Struts while using declarative exception handling. Obviously one can't do much
to declare handling for something like InvocationTargetException, but in the
case where I want to throw a business exception instead of routing to a view
page, I can't do that from a DispatchCommand because the business exception is
always wrapped in InvocationTargetException.
If I don't get any feedback in the next few days, I'll probably make this change.