ExceptionDuringTestError should provide an accessor for
instance variable rootCause or better yet - use the Java
1.4 exception chaining mechanism.
The attached patch uses exception chaining.
patch that uses the Java 1.4 cause variable instead of rootCause
Logged In: YES
Also, it would be better to throw an Exception instead of an
Error. The Error class is for serious errors that the
application should not handle.
However, ServletException (J2EE 1.4) doesn't use the
exception chaining model, so if your Action throws an
exception, the ActionServlet will not chain it using the 1.4
exception chaining model. It does, however, have a
getRootCause() method that will return the "root exception".
Maybe ExceptionDuringTestError should at least have a
Log in to post a comment.