Package net.sourceforge.stripes.exception

Examples of net.sourceforge.stripes.exception.StripesRuntimeException


    public <T> T newInstance(Constructor<T> constructor, Object... params) {
        try {
            return postProcess(constructor.newInstance(params));
        }
        catch (InstantiationException e) {
            throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
        }
        catch (IllegalAccessException e) {
            throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
        }
        catch (InvocationTargetException e) {
            throw new StripesRuntimeException("Could not invoke constructor " + constructor, e);
        }
    }
View Full Code Here


    public <T> DefaultConstructorWrapper<T> constructor(Class<T> clazz, Class<?>... parameterTypes) {
        try {
            return new DefaultConstructorWrapper<T>(this, clazz.getConstructor(parameterTypes));
        }
        catch (SecurityException e) {
            throw new StripesRuntimeException("Could not instantiate " + clazz, e);
        }
        catch (NoSuchMethodException e) {
            throw new StripesRuntimeException("Could not instantiate " + clazz, e);
        }
    }
View Full Code Here

        Configuration configuration = StripesFilter.getConfiguration();
        if (configuration != null) {
            this.baseUrl = configuration.getActionResolver().getUrlBinding(beanType);
        }
        else {
            throw new StripesRuntimeException("Unable to lookup URL binding for ActionBean class "
                    + "because there is no Configuration object available.");
        }
    }
View Full Code Here

                }
            }
        }

        if (configuration == null) {
            StripesRuntimeException sre = new StripesRuntimeException(
                    "Something is trying to access the current Stripes configuration but the " +
                    "current request was never routed through the StripesFilter! As a result " +
                    "the appropriate Configuration object cannot be located. Please take a look " +
                    "at the exact URL in your browser's address bar and ensure that any " +
                    "requests to that URL will be filtered through the StripesFilter according " +
View Full Code Here

                    this.rendererClass);
            renderer.init(tag);
            return renderer;
        }
        catch (Exception e) {
            throw new StripesRuntimeException("Could not create an instance of the configured " +
                "TagErrorRenderer class '" + this.rendererClass.getName() + "'. Please check " +
                "that the class is public and has a no-arg public constructor.", e);
        }
    }
View Full Code Here

            }

            writer.append(rootVariableName).append(";\n");
        }
        catch (Exception e) {
            throw new StripesRuntimeException("Could not build JavaScript for object. An " +
                    "exception was thrown while trying to convert a property from Java to " +
                    "JavaScript. The object being converted is: " + this.rootObject, e);
        }

    }
View Full Code Here

        if (PARAMETER_NAME_EVENT.equals(name)) {
            Method defaultHandler;
            try {
                defaultHandler = actionResolver.getDefaultHandler(beanClass);
            } catch (StripesServletException e) {
                throw new StripesRuntimeException("Caught an exception trying to get default handler for ActionBean '" + beanClass.getName() +
                        "'. Make sure this ActionBean has a default handler.", e);
            }
            HandlesEvent annotation = defaultHandler.getAnnotation(HandlesEvent.class);
            if (annotation != null) {
                this.defaultValue = annotation.value();
View Full Code Here

    public static String urlEncode(String value) {
        try {
            return URLEncoder.encode(value, "UTF-8");
        }
        catch (UnsupportedEncodingException e) {
            throw new StripesRuntimeException("Unsupported encoding?  UTF-8?  That's unpossible.");
        }
    }
View Full Code Here

    public static String urlDecode(String value) {
        try {
            return URLDecoder.decode(value, "UTF-8");
        }
        catch (UnsupportedEncodingException e) {
            throw new StripesRuntimeException("Unsupported encoding?  UTF-8?  That's unpossible.");
        }
    }
View Full Code Here

                    }
                }
            }
        }
        catch (Exception e) {
            throw new StripesRuntimeException
                    ("Problem instantiating default configuration objects.", e);
        }
    }
View Full Code Here

TOP

Related Classes of net.sourceforge.stripes.exception.StripesRuntimeException

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.