Exceptions swallowed by PrimeFacesPhaseListener

UI Components for JSF
Post Reply
fedevela
Posts: 5
Joined: 04 Mar 2010, 18:29

21 Oct 2010, 15:53

Hello,

I have an error handling page that sends an email to the administrators with details about an exception when it occurs. However, some exceptions are not bubbling up to the top of the stacktrace because PrimeFacesPhaseListener, I was wondering if there is a particular reason for having PrimeFacesPhaseListener catch an exception and not rethrow it.

For example:

Code: Select all

	private void handleAjaxRequest(FacesContext facesContext) throws IOException {
...
			}catch(IOException exception) {
				exception.printStackTrace();
			}
... here ...

Code: Select all

	public static final ContextCallback RENDER_PARTIAL_RESPONSE = new ContextCallback() {
		public void invokeContextCallback(FacesContext facesContext, UIComponent component) {
			try {
				((AjaxComponent) component).encodePartially(facesContext);
			} catch (IOException e) {
				e.printStackTrace();
			} catch (Exception ex) {
				ex.printStackTrace();
			}
		}
	};
... and here ...

Code: Select all

	private void initPartialResponseWriter(FacesContext facesContext) {
		if(facesContext.getResponseWriter() != null)
			return;
		try {
...
		}catch(IOException exception) {
			exception.printStackTrace();
		}
	}

fedevela
Posts: 5
Joined: 04 Mar 2010, 18:29

21 Oct 2010, 16:06

Sorry forgot to mention:

I am using PF 2.1, JSF Mojarra 2.0.2-b10 and glassfish 3.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 30 guests