Package org.jboss.solder.exception.control

Examples of org.jboss.solder.exception.control.ExceptionToCatch


            final NavigationEnum nav = NavigationEnum.valueOf(uri.substring(uri.lastIndexOf("/") + 1).toUpperCase());

            throw new ServletException(nav.getException()); // wrapping because we don't want to try / catch and we can't add
            // the throws list
        } catch (IllegalArgumentException e) {
            this.catchEvent.fire(new ExceptionToCatch(e)); // If there is no catch integration, this is how to add basic
            // integration yourself
        }
    }
View Full Code Here


    public void handle() throws FacesException {
        log.trace("Handling Exceptions");
        for (Iterator<ExceptionQueuedEvent> it = getUnhandledExceptionQueuedEvents().iterator(); it.hasNext();) {
            Throwable t = it.next().getContext().getException();
            log.trace(MessageFormat.format("Handling Exception {0}", t.getClass().getName()));
            ExceptionToCatch catchEvent = new ExceptionToCatch(t, FacesLiteral.INSTANCE);
            try {
                if (log.isTraceEnabled()) {
                    log.trace("Firing event");
                }
                beanManager.fireEvent(catchEvent);
            } catch (Exception e) {
                if (!e.equals(t)) {
                    log.debug("Throwing exception thrown from within Seam Catch");
                    throw new RuntimeException(e);
                }
                continue; // exception will be handled by getWrapped().handle() below
            }
            if (catchEvent.isHandled()) {
                log.debug(MessageFormat.format("Exception handled {0}", t.getClass().getName()));
                it.remove();
            }
        }
        if (getUnhandledExceptionQueuedEvents().iterator().hasNext()) {
View Full Code Here

TOP

Related Classes of org.jboss.solder.exception.control.ExceptionToCatch

Copyright © 2018 www.massapicom. 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.