You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Martin Kočí (Created JIRA)" <de...@myfaces.apache.org> on 2012/03/13 20:50:40 UTC
[jira] [Created] (MYFACES-3501) Remove unncecessary exception
wrapping
Remove unncecessary exception wrapping
--------------------------------------
Key: MYFACES-3501
URL: https://issues.apache.org/jira/browse/MYFACES-3501
Project: MyFaces Core
Issue Type: Sub-task
Reporter: Martin Kočí
Assignee: Martin Kočí
Priority: Trivial
Similar to MYFACES-3214:
ld code uses:
catch(Exception ex)
{
throw new FacesException("Could not retrieve value of component with path : "+
getPathToComponent(component),ex);
}
to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
2) every EL expression knows about it's location (MYFACES-3202)
--
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
[jira] [Commented] (MYFACES-3501) Remove unncecessary exception
wrapping
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281031#comment-13281031 ]
Leonardo Uribe commented on MYFACES-3501:
-----------------------------------------
Just for the record, checking the code I notice these patches relies on the commit done in rev:
#1300273
#1300275
#1305497
#1305498
Related to MYFACES-3199 Handling AbortProcessingException is unconsistent, which added the unwrapping code for AbortProcessingException inside UIViewRoot._broadcastAll().
> Remove unncecessary exception wrapping
> --------------------------------------
>
> Key: MYFACES-3501
> URL: https://issues.apache.org/jira/browse/MYFACES-3501
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Trivial
> Attachments: ActionListenerImpl.patch, RendererUtils.patch, TextInstruction.patch, UIComponentBase.patch
>
>
> Similar to MYFACES-3214:
> ld code uses:
> catch(Exception ex)
> {
> throw new FacesException("Could not retrieve value of component with path : "+
> getPathToComponent(component),ex);
> }
> to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
> 1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
> 2) every EL expression knows about it's location (MYFACES-3202)
--
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
[jira] [Commented] (MYFACES-3501) Remove unncecessary exception
wrapping
Posted by "Martin Kočí (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281152#comment-13281152 ]
Martin Kočí commented on MYFACES-3501:
--------------------------------------
> In this case, ConverterException is special and has a meaning according to JSF spec, so I suppose this is
> incorrect
the code in RendererUtils is:
try
{
converter = findUIOutputConverter(facesContext, output);
}
catch (FacesException e)
{
throw new ConverterException(e);
}
this can only happen during "converter resolving", but spec says: "ConverterException is an exception thrown by the getAsObject() or getAsText() method of a Converter, to indicate that the requested conversion cannot be performed." and therefore I think purpose of ConverterException is not the indication that converter cannot be found.
But after checking it more, this tyr-catch looks like dead code: findUIOutputConverter method cannot throw FacesException, only ELException
> Remove unncecessary exception wrapping
> --------------------------------------
>
> Key: MYFACES-3501
> URL: https://issues.apache.org/jira/browse/MYFACES-3501
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Trivial
> Fix For: 2.0.14, 2.1.8
>
> Attachments: ActionListenerImpl.patch, RendererUtils.patch, TextInstruction.patch, UIComponentBase.patch
>
>
> Similar to MYFACES-3214:
> ld code uses:
> catch(Exception ex)
> {
> throw new FacesException("Could not retrieve value of component with path : "+
> getPathToComponent(component),ex);
> }
> to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
> 1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
> 2) every EL expression knows about it's location (MYFACES-3202)
--
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
[jira] [Updated] (MYFACES-3501) Remove unncecessary exception
wrapping
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-3501:
------------------------------------
Resolution: Fixed
Fix Version/s: 2.1.8
2.0.14
Status: Resolved (was: Patch Available)
> Remove unncecessary exception wrapping
> --------------------------------------
>
> Key: MYFACES-3501
> URL: https://issues.apache.org/jira/browse/MYFACES-3501
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Trivial
> Fix For: 2.0.14, 2.1.8
>
> Attachments: ActionListenerImpl.patch, RendererUtils.patch, TextInstruction.patch, UIComponentBase.patch
>
>
> Similar to MYFACES-3214:
> ld code uses:
> catch(Exception ex)
> {
> throw new FacesException("Could not retrieve value of component with path : "+
> getPathToComponent(component),ex);
> }
> to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
> 1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
> 2) every EL expression knows about it's location (MYFACES-3202)
--
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
[jira] [Updated] (MYFACES-3501) Remove unncecessary exception
wrapping
Posted by "Martin Kočí (Updated JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Martin Kočí updated MYFACES-3501:
---------------------------------
Status: Patch Available (was: Open)
> Remove unncecessary exception wrapping
> --------------------------------------
>
> Key: MYFACES-3501
> URL: https://issues.apache.org/jira/browse/MYFACES-3501
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Trivial
> Attachments: ActionListenerImpl.patch, RendererUtils.patch, UIComponentBase.patch
>
>
> Similar to MYFACES-3214:
> ld code uses:
> catch(Exception ex)
> {
> throw new FacesException("Could not retrieve value of component with path : "+
> getPathToComponent(component),ex);
> }
> to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
> 1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
> 2) every EL expression knows about it's location (MYFACES-3202)
--
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
[jira] [Commented] (MYFACES-3501) Remove unncecessary exception
wrapping
Posted by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org>.
[ https://issues.apache.org/jira/browse/MYFACES-3501?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13281051#comment-13281051 ]
Leonardo Uribe commented on MYFACES-3501:
-----------------------------------------
I applied the patches provided, but there are some lines in RendererUtils.patch that removes a wrapping that throws ConverterException. In this case, ConverterException is special and has a meaning according to JSF spec, so I suppose this is incorrect. Please reopen this issue again if you have any objections about it.
> Remove unncecessary exception wrapping
> --------------------------------------
>
> Key: MYFACES-3501
> URL: https://issues.apache.org/jira/browse/MYFACES-3501
> Project: MyFaces Core
> Issue Type: Sub-task
> Components: General
> Reporter: Martin Kočí
> Assignee: Martin Kočí
> Priority: Trivial
> Attachments: ActionListenerImpl.patch, RendererUtils.patch, TextInstruction.patch, UIComponentBase.patch
>
>
> Similar to MYFACES-3214:
> ld code uses:
> catch(Exception ex)
> {
> throw new FacesException("Could not retrieve value of component with path : "+
> getPathToComponent(component),ex);
> }
> to provide path to problematic component. With JSF 2.0 and exception handler is is not necessary (and only makes stacktrace harder to read), because:
> 1) exception is always queued with component instance (see MYFACES-3201 and MYFACES-3199)
> 2) every EL expression knows about it's location (MYFACES-3202)
--
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