[jsr-314-open] New spec issue 659 - MethodExpressionActionListener.processAction() logs and wraps exceptions in AbortProcessingExceptions
Pete Muir
pmuir at redhat.com
Wed Nov 4 07:57:59 EST 2009
On 4 Nov 2009, at 05:49, Martin Marinschek wrote:
> Hi guys,
>
> See the issue comment for the new spec issue:
>
> https://javaserverfaces-spec-public.dev.java.net/issues/show_bug.cgi?id=659
>
> below. Please let's please fix this rather soon - I have an ugly hack
> in place to work around this.
>
> ======
>
> One case we missed when we decided to fix exception-handling for 2.0:
>
> In MethodExpressionActionListener.processAction(), we first do
> custom logging of
> an exception, and then rethrow it with:
>
> throw cause == null ? new AbortProcessingException(thrown.getMessage
> (),
> thrown) : new AbortProcessingException
> (thrown.getMessage(),
> cause);
>
> which leads to a silently (for the user - not for the logs if they
> are switched
> on and available) swallowed exception in the action-listener. I
> believe the
> whole exception-handling in this method can be made a lot simpler -
> we need to
> check if the user threw an AbortProcessingException (might also be
> the cause of
> the ELException) and rethrow that, if not, do nothing - just let the
> exception
> bubble up to the exception-handler.
Yup, this was the original intention - that any exception used for
flow control (ugh!) wasn't passed to exception handler.
More information about the jsr-314-open-mirror
mailing list