Examples of ExceptionHandlerAssistant


Examples of org.apache.tapestry5.ExceptionHandlerAssistant

            if (entry.getValue() instanceof Class && ExceptionHandlerAssistant.class.isAssignableFrom((Class) entry.getValue()))
            {
                @SuppressWarnings("unchecked")
                Class<ExceptionHandlerAssistant> handlerType = (Class<ExceptionHandlerAssistant>) entry.getValue();
                ExceptionHandlerAssistant assistant = handlerAssistants.get(handlerType);
                if (assistant == null)
                {
                    assistant = (ExceptionHandlerAssistant) serviceResources.autobuild(handlerType);
                    handlerAssistants.put(handlerType, assistant);
                }
View Full Code Here

Examples of org.apache.tapestry5.ExceptionHandlerAssistant

        }

        Object[] exceptionContext = formExceptionContext(cause);
        Object value = configuration.get(causeClass);
        Object page = null;
        ExceptionHandlerAssistant assistant = null;
        if (value instanceof ExceptionHandlerAssistant)
        {
            assistant = (ExceptionHandlerAssistant) value;
            // in case the assistant changes the context
            List context = Arrays.asList(exceptionContext);
            page = assistant.handleRequestException(exception, context);
            exceptionContext = context.toArray();
        } else if (!(value instanceof Class))
        {
            renderException(exception);
            return;
View Full Code Here

Examples of org.apache.tapestry5.ExceptionHandlerAssistant

      exceptionHandler.handleRequestException(new AccessControlException("No permission"));
  }
 
    @Test
    public void handleRequestExceptionWithConfiguredAssistant() throws IOException {
        ExceptionHandlerAssistant assistant = new ExceptionHandlerAssistant() {
            @Override
            public Object handleRequestException(Throwable exception, List<Object> exceptionContext)
                    throws IOException
            {
                return null;
View Full Code Here

Examples of org.apache.tapestry5.ExceptionHandlerAssistant

                        + " was contributed");
           
            if (ExceptionHandlerAssistant.class.isAssignableFrom((Class) entry.getValue())) {
                @SuppressWarnings("unchecked")
                Class<ExceptionHandlerAssistant> handlerType = (Class<ExceptionHandlerAssistant>) entry.getValue();
                ExceptionHandlerAssistant assistant = handlerAssistants.get(handlerType);
                if (assistant == null) {
                    assistant = (ExceptionHandlerAssistant) serviceResources.autobuild(handlerType);
                    handlerAssistants.put(handlerType, assistant);
                }
                entry.setValue(assistant);
View Full Code Here

Examples of org.apache.tapestry5.ExceptionHandlerAssistant

        }

        Object[] exceptionContext = formExceptionContext(cause);
        Object value = configuration.get(causeClass);
        Object page = null;
        ExceptionHandlerAssistant assistant = null;
        if (value instanceof ExceptionHandlerAssistant) {
            assistant = (ExceptionHandlerAssistant) value;
            // in case the assistant changes the context
            List context = Arrays.asList(exceptionContext);
            page = assistant.handleRequestException(exception, context);
            exceptionContext = context.toArray();
        }
        else if (!(value instanceof Class)) {
            renderException(exception);
            return;
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.