try { // some code } catch (Throwable e) { ExceptionHandler handler = handlers.get(e.getClass()); if (handler != null) handler.handle(e); else DEFAULT_HANDLER.handle(e); } // to be continued
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
@Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ public void handle() throws FacesException { getWrapped().handle(); }
/** * <p>The default behavior of this method is to * call {@link javax.faces.context.ExceptionHandler#handle()} * on the wrapped {@link ExceptionHandler} object.</p> * * @see javax.faces.context.ExceptionHandler#handle() */ @Override public void handle() throws FacesException { getWrapped().handle(); }
public static void handleExceptions(FacesContext facesContext) { facesContext.getExceptionHandler().handle(); }
@Override public void handle() throws FacesException { FacesContext context = FacesContext.getCurrentInstance(); findErrorMessages(context); handleException(context); wrapped.handle(); }
@Override public void handle() throws FacesException { FacesContext context = FacesContext.getCurrentInstance(); findErrorMessages(context); handleException(context); wrapped.handle(); }
@Override public void handle() throws FacesException { Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator(); while (i.hasNext()) { ExceptionQueuedEvent event = i.next(); ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource(); // get the exception from context Throwable t = context.getException(); if (NonexistentConversationException.class.isInstance(t)) { i.remove(); throw RuntimeException.class.cast(t); } } delegate.handle(); } }
@Override public void handle() throws FacesException { FacesContext facesContext = FacesContext.getCurrentInstance(); ExceptionQueuedEventContext exceptionContext; Throwable root; for (Iterator<ExceptionQueuedEvent> iter = getUnhandledExceptionQueuedEvents().iterator(); iter.hasNext();) { exceptionContext = (ExceptionQueuedEventContext) iter.next().getSource(); root = getRoot(exceptionContext.getException()); if (handleException(root, facesContext)) { iter.remove(); } } if (getUnhandledExceptionQueuedEvents().iterator().hasNext()) { getWrapped().handle(); } }
/** * Set every exception as a global FATAL faces message. */ @Override public void handle() { for (Iterator<ExceptionQueuedEvent> iter = getUnhandledExceptionQueuedEvents().iterator(); iter.hasNext();) { addGlobal(new FacesMessage(SEVERITY_FATAL, createFatalMessage(iter.next().getContext().getException()), null)); iter.remove(); } getWrapped().handle(); }
/** * Set every exception as a global FATAL faces message. */ @Override public void handle() { for (Iterator<ExceptionQueuedEvent> iter = getUnhandledExceptionQueuedEvents().iterator(); iter.hasNext();) { addGlobal(new FacesMessage(SEVERITY_FATAL, createFatalMessage(iter.next().getContext().getException()), null)); iter.remove(); } getWrapped().handle(); }
/** * Handle the ajax exception as follows, only and only if the current request is an ajax request with an uncommitted * response and there is at least one unhandled exception: * <ul> * <li>Find the root cause of the exception by {@link #findExceptionRootCause(FacesContext, Throwable)}. * <li>Find the error page location based on root cause by {@link #findErrorPageLocation(FacesContext, Throwable)}. * <li>Set the standard servlet error request attributes. * <li>Force JSF to render the full error page in its entirety. * </ul> * Any remaining unhandled exceptions will be swallowed. Only the first one is relevant. */ @Override public void handle() { handleAjaxException(getContext()); getWrapped().handle(); }
/** * Handle the ajax exception as follows, only and only if the current request is an ajax request with an uncommitted * response and there is at least one unhandled exception: * <ul> * <li>Find the root cause of the exception by {@link #findExceptionRootCause(FacesContext, Throwable)}. * <li>Find the error page location based on root cause by {@link #findErrorPageLocation(FacesContext, Throwable)}. * <li>Set the standard servlet error request attributes. * <li>Force JSF to render the full error page in its entirety. * </ul> * Any remaining unhandled exceptions will be swallowed. Only the first one is relevant. */ @Override public void handle() { handleAjaxException(getContext()); getWrapped().handle(); }