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
{