[
https://issues.apache.org/jira/browse/MYFACES-3199?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13224613#comment-13224613
]
Martin Kočí commented on MYFACES-3199:
--------------------------------------
>1) execute one listener in try catch block and catch (Exception e)
> 2) if
> 2a) exception is instance of APE _or any of the causes of the exception are
> an APE, DON'T_ publish ExceptionQueuedEvent > and terminate processing for
> current event _
Problem1 : UIViewRoot._broadcastAll queues APE into ExceptionQueuedEvent and
check for "any of the causes of the exception are an APE" is missing in code
> 2b) for any other exception publish ExceptionQueuedEvent
Problem2 : This is done partially : in LifecycleImpl.publishException but
without source component = the most important type here - the component - is
missing
ad Problem 1) : publishing APE into event is not a big problem; I cannot find
in spec if this is required. Only Application.publishEvent(FacesContext,
Class<? extends SystemEvent>, Object) says: the (APE) exception must be logged
with Level.SEVERE " -> not to queue
ad Problem 2) queuing the source component is required to solve the mail goal
of MYFACES-3053: "any time there is an error in *any* part of the lifecycle,
the user should see not just a cryptic stack trace, but also the **component**
- including file and line number - that triggered the problem"
I'll reopen this issues to discuss the problems.
> Handling AbortProcessingException is unconsistent
> -------------------------------------------------
>
> Key: MYFACES-3199
> URL: https://issues.apache.org/jira/browse/MYFACES-3199
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Environment: myface core trunk
> Reporter: Martin Kočí
> Assignee: Leonardo Uribe
> Fix For: 2.0.9, 2.1.3
>
>
> UIViewRoot:
> try {
> source.broadcast(event);
> }
> catch (AbortProcessingException e)
> {
> ExceptionQueuedEventContext exceptionContext
> = new ExceptionQueuedEventContext(context, e, source,
> context.getCurrentPhaseId());
> context.getApplication().publishEvent(context,
> ExceptionQueuedEvent.class, exceptionContext);
>
> // Abortion
> return false;
> }
> Problem 1:
> <h:inputText valueChangeListener="#{bean.processValueChange}">
> MethodExpressionValueChangeListener wraps all exceptions to
> AbortProcessingException and therefore exception is queued
> Problem 2:
> <h:inputText >
> <f:valueChangeListener binding="#{bean}" />
> </h:inputText>
> ValueChangeListenerHandler does not wrap exception to
> AbortProcessingException and therefore exception is not queued in this block
> (but it is queued from phase executor but without component info)
> Problem 3: JSF spec 2.1 :
> "Clarification made: throwing an AbortProcessingException tells an
> implementation that no further broadcast of the
> current event occurs. Does not affect future events."
> But I think that code in UIViewRoot makes opposite: // Abortion return
> false;
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira