docs: @Override
      public void handle() throws FacesException
      {
          init();
          if (!isUseMyFacesErrorHandling())
          {
              if (isErrorPagePresent())
              {
                  FacesContext facesContext = FacesContext.getCurrentInstance();
                  // save current view in the request map to access it on the error page
                  facesContext.getExternalContext().getRequestMap().put(ErrorPageWriter.VIEW_KEY,
                                                                        facesContext.getViewRoot());
              }
              try
              {
                  super.handle();
              }
              catch (FacesException e)
              {
                  FacesContext facesContext = FacesContext.getCurrentInstance();
                  if (e.getCause() instanceof ViewNotFoundException)
                  {
                      facesContext.getExternalContext().setResponseStatus(HttpServletResponse.SC_NOT_FOUND);
                  }
                  else
                  {
                      facesContext.getExternalContext().setResponseStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
                  }
                  throw e;
              }
              return;
          }
          else
          {
              if (unhandled != null && !unhandled.isEmpty())
              {
                  if (handled == null)
                  {
                      handled = new LinkedList<ExceptionQueuedEvent>();
                  }
                  
                  List<Throwable> throwableList = new ArrayList<Throwable>();
                  List<UIComponent> components = new ArrayList<UIComponent>();
                  FacesContext facesContext = null;
                  
                  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();
      
                          if (facesContext == null)
                          {
                              facesContext = event.getContext().getContext();
                          }
                          
                          // and call getException() on the returned result
                          Throwable exception = context.getException();
                          
                          // Upon encountering the first such Exception that is not an instance of
                          // javax.faces.event.AbortProcessingException
                          if (!shouldSkip(exception))
                          {
                              // set handledAndThrown so that getHandledExceptionQueuedEvent() returns this event
                              handledAndThrown = event;
                              
                              Throwable rootCause = getRootCause(exception);
                              
                              throwableList.add(rootCause == null ? exception : rootCause);
                              components.add(event.getContext().getComponent());
                              
                              //break;
                          }
                          else
                          {
                              // Testing mojarra it logs a message and the exception
                              // however, this behaviour is not mentioned in the spec
                              log.log(Level.SEVERE, exception.getClass().getName() + " occured while processing " +
                                      (context.inBeforePhase() ? "beforePhase() of " : 
                                              (context.inAfterPhase() ? "afterPhase() of " : "")) + 
                                      "phase " + context.getPhaseId() + ": " +
                                      "UIComponent-ClientId=" + 
                                      (context.getComponent() != null ? 
                                              context.getComponent().getClientId(context.getContext()) : "") + ", " +
                                      "Message=" + exception.getMessage());
                              
                              log.log(Level.SEVERE, exception.getMessage(), exception);
                          }
                      }
                      finally
                      {
                          // if we will throw the Exception or if we just logged it,
                          // we handled it in either way --> add to handled
                          handled.add(event);
                          unhandled.remove(event);
                      }
                  } while (!unhandled.isEmpty());
  
                  if (facesContext == null)
                  {
                      facesContext = FacesContext.getCurrentInstance();
                  }
                  if (throwableList.size() == 1)
                  {
                      ErrorPageWriter.handle(facesContext, components, throwableList.get(0));
                  }
                  else if (throwableList.size() > 1)
                  {
                      ErrorPageWriter.handle(facesContext, components,
                                             throwableList.toArray(new Throwable[throwableList.size()]));
                  }
              }
          }
      }