You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Leonardo Uribe (JIRA)" <de...@myfaces.apache.org> on 2008/07/03 06:58:45 UTC
[jira] Updated: (MYFACES-1887) Print Multiple exceptions
information thrown on update model
[ https://issues.apache.org/jira/browse/MYFACES-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Leonardo Uribe updated MYFACES-1887:
------------------------------------
Status: Patch Available (was: Open)
> Print Multiple exceptions information thrown on update model
> ------------------------------------------------------------
>
> Key: MYFACES-1887
> URL: https://issues.apache.org/jira/browse/MYFACES-1887
> Project: MyFaces Core
> Issue Type: Improvement
> Affects Versions: 1.1.6-SNAPSHOT, 1.2.3
> Reporter: Leonardo Uribe
> Assignee: Leonardo Uribe
> Attachments: patchHandleErrorListUpdatePhase11.patch, patchHandleErrorListUpdatePhase12.patch
>
>
> When update model phase is executed, if multiple error occur when setting the values (could occur when a value is set to a EL expression), the errors should be added to the org.apache.myfaces.errorHandling.exceptionList, so the FacesServlet can manage it properly like this:
> Exception while ...............message 1..........
> Exception while ...............message 2..........
> Caused by:
> ........cause 1.......
> ........cause 2.......
> .....stackTrace 1.....
> .....stackTrace 2.....
> Checking the code there is some errors like this (class UIInput myfaces core 1.1.5):
> private void queueExceptionInRequest(FacesContext context, ValueBinding binding, Exception e) {
> List li = (List) context.getExternalContext().getRequestMap().get(ERROR_HANDLING_EXCEPTION_LIST);
> if(null==li) {
> li = new ArrayList();
> context.getExternalContext().getRequestMap().put(ERROR_HANDLING_EXCEPTION_LIST, li);
> li.add(new FacesException("Exception while setting value for expression : "+
> binding.getExpressionString()+" of component with path : "
> + _ComponentUtils.getPathToComponent(this),e));
> }
> }
> Note the bad closing '}', it causes that previous errors be lost.
> The idea is add a method to be called from FacesServlet like this:
> class _ErrorPageWriter
> public static void handleExceptionList(FacesContext facesContext, List exceptionList) throws ServletException, IOException {
> ...........handle it..........
> }
> if no method on custom ErrorPageWriter is defined, the old way is used (just show the first exception).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.