Examples of ExceptionQueuedEvent


Examples of javax.faces.event.ExceptionQueuedEvent

            do
            {
                // For each ExceptionEvent in the list

                // get the event to handle
                ExceptionQueuedEvent event = unhandled.peek();
                try
                {
                    // call its getContext() method
                    ExceptionQueuedEventContext context = event.getContext();

                    // and call getException() on the returned result
                    Throwable exception = context.getException();

                    // Upon encountering the first such Exception that is not an instance of
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

  @Override
  public void handle() {
    // TODO
    Iterator<ExceptionQueuedEvent> i = this.getUnhandledExceptionQueuedEvents().iterator();
    while (i.hasNext()) {
      ExceptionQueuedEvent event = i.next();
      ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

      Throwable t = context.getException();
      RockFrameworkLogger.getLogger().warn(t.getMessage(), t);

    }
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

     */
    @SuppressWarnings({"ThrowableInstanceNeverThrown"})
    public void handle() throws FacesException {

        for (Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator(); i.hasNext(); ) {
            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();
            try {
                Throwable t = context.getException();
                if (isRethrown(t)) {
                    handled = event;
                    Throwable unwrapped = getRootCause(t);
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

    @Override
    public void handle() throws FacesException {
        Iterable<ExceptionQueuedEvent> events = this.wrapped.getUnhandledExceptionQueuedEvents();
        for(Iterator<ExceptionQueuedEvent> it = events.iterator(); it.hasNext();) {
            ExceptionQueuedEvent event = it.next();
            ExceptionQueuedEventContext eqec = event.getContext();
           
            if(eqec.getException() instanceof ViewExpiredException) {
                FacesContext context = eqec.getContext();
                NavigationHandler navHandler = context.getApplication().getNavigationHandler();
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

    @Override
    public void handle() throws FacesException {

        final Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator();
        while (i.hasNext()) {
            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            Throwable t = context.getException();

            final FacesContext fc = FacesContext.getCurrentInstance();
            final NavigationHandler nav = fc.getApplication().getNavigationHandler();
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

    @Override
    public void handle() throws FacesException {

        final Iterator<ExceptionQueuedEvent> i = getUnhandledExceptionQueuedEvents().iterator();
        while (i.hasNext()) {
            ExceptionQueuedEvent event = i.next();
            ExceptionQueuedEventContext context = (ExceptionQueuedEventContext) event.getSource();

            Throwable t = context.getException();

            final FacesContext fc = FacesContext.getCurrentInstance();
            final NavigationHandler nav = fc.getApplication().getNavigationHandler();
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

                do
                {
                    // For each ExceptionEvent in the list
                   
                    // get the event to handle
                    ExceptionQueuedEvent event = unhandled.peek();
                    try
                    {
                        // call its getContext() method
                        ExceptionQueuedEventContext context = event.getContext();
                       
                        // and call getException() on the returned result
                        Throwable exception = context.getException();
                       
                        if (errorHandlerClass != null)
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

        }
       
        int i = 0;
        for (Iterator<ExceptionQueuedEvent> it = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();)
        {
            ExceptionQueuedEvent eqe = it.next();
            Throwable e = eqe.getContext().getException();
            if (e instanceof AbortProcessingException && e.getCause() == null)
            {
                //Expected
                i++;
            }
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

        catch(FacesException e)
        {
            return;
        }
        Iterable<ExceptionQueuedEvent> unhandledExceptionQueuedEvents = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents();
        ExceptionQueuedEvent exceptionQueuedEvent = unhandledExceptionQueuedEvents.iterator().next();
        
        Assert.assertNotNull(exceptionQueuedEvent.getContext().getException(), "Exception should be queued at this point.");
    }
View Full Code Here

Examples of javax.faces.event.ExceptionQueuedEvent

        catch(FacesException e)
        {
            return;
        }
        Iterable<ExceptionQueuedEvent> unhandledExceptionQueuedEvents = facesContext.getExceptionHandler().getUnhandledExceptionQueuedEvents();
        ExceptionQueuedEvent exceptionQueuedEvent = unhandledExceptionQueuedEvents.iterator().next();
        
        Assert.assertNotNull(exceptionQueuedEvent.getContext().getException(), "Exception should be queued at this point.");
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.