New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent exception handling for phaselisteners #1216
Comments
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented |
@glassfishrobot Commented Update UIViewRoot.encodeBegin(FacesContext context) javadoc by removing the "Any errors that occur during invocation of any of the the beforePhase Update UIViewRoot.encodeEnd(FacesContext context) javadoc by removing the "Any errors that occur during invocation of the afterPhase Then an update to the implementation would need to be made to publish the |
@glassfishrobot Commented |
@glassfishrobot Commented |
|
Exception handling for phase listeners behaves differently depending on if they are registered globally in faces-config.xml or with f:phaseListener for a particular view root.
In the first (global) case any exception thrown by them gets forwarded to an exception handler as described in the spec.
In the second (per view root) case all exceptions get logged and swallowed as described in the UIViewRoot documentation.
This inconsistent behavior adds increased complexity when implementing PhaseListeners. Ideally both cases should forward any exception to the exception handler so they can be handled there.
See also the discussion of the problem in: https://java.net/jira/browse/JAVASERVERFACES-2985
Affected Versions
[2.1, 2.2]
The text was updated successfully, but these errors were encountered: