-
1. Re: AjaxViewRoot.processEvents eats AbortProcessingException
hbmailinglist Mar 9, 2009 12:41 PM (in response to hbmailinglist)Sorry I may have posted this in the wrong forum.
-
2. Re: AjaxViewRoot.processEvents eats AbortProcessingException
nbelaevski Mar 9, 2009 1:01 PM (in response to hbmailinglist)Hello,
No, here is the code snippet from UIViewRoot JSF RI 1.2_12:while (!eventsForPhaseId.isEmpty()) { FacesEvent event = eventsForPhaseId.get(0); UIComponent source = event.getComponent(); try { source.broadcast(event); } catch (AbortProcessingException e) { if (LOGGER.isLoggable(Level.SEVERE)) { UIComponent component = event.getComponent(); String id = ""; if (component != null) { id = component.getId(); if (id == null) { id = component.getClientId(context); } } LOGGER.log(Level.SEVERE, "error.component.abortprocessing_thrown", new Object[]{event.getClass().getName(), phaseId.toString(), id}); LOGGER.log(Level.SEVERE, e.toString(), e); } } eventsForPhaseId.remove(0); // Stay at current position }
As you can see it handles events exactly in the same way. -
3. Re: AjaxViewRoot.processEvents eats AbortProcessingException
hbmailinglist Mar 11, 2009 2:41 AM (in response to hbmailinglist)Thank you for sharing that. I see your point. I'm still a bit confused though. I guess I'm not thinking correctly about this problem.
What should happen if there are runtime exception in my application? How can jsf-ri or richfaces know how to deal with such exceptions?
In fact, I'm using myfaces and I wanted to handle any uncaught exceptions using my own catch all exception handler (org.apache.myfaces.ERROR_HANDLER). But if the exceptions are being caught, logged and not rethrown, how can I inform the user that the application is in strange state? Why is it better to log silently & continue?
Thanks in advance. -
4. Re: AjaxViewRoot.processEvents eats AbortProcessingException
nbelaevski Mar 12, 2009 10:37 AM (in response to hbmailinglist)Hello,
JSF 2.0 will address this problem by defining standard mechanism for exception handlers: http://www.javabeat.net/tips/116-new-features-in-jsf-20.html