Package org.apache.avalon.framework

Examples of org.apache.avalon.framework.CascadingException


    }

    public void testGetCause()
    {
        RuntimeException re = new RuntimeException();
        CascadingException e = new CascadingException( "msg", re );

        assertEquals( re, e.getCause() );

        e = new CascadingException( "msg", null );
        assertNull( e.getCause() );

        // default to jdk 1.3 cause (not that it seems to help,
        // but it still makes sense)
        /*Exception exc = new Exception("blah");
        try
View Full Code Here


        }*/
    }

    public void testCasts()
    {
        CascadingException e = new CascadingException( "msg", null );
        assertTrue( e instanceof Exception );
        assertTrue( e instanceof CascadingThrowable );
    }
View Full Code Here

       
        Class modelClass;
        try {
            modelClass = Thread.currentThread().getContextClassLoader().loadClass(className);
        } catch(Exception e) {
            throw new CascadingException("Cannot load class '" + className + "', at " +
                    DomHelper.getLocation(treeModelElement), e);
        }
       
        if (!TreeModel.class.isAssignableFrom(modelClass)) {
            throw new Exception("Class '" + className + "' doesn't implement TreeModel, at " +
View Full Code Here

        String widgetName = widgetDefinition.getLocalName();
        WidgetDefinitionBuilder builder = null;
        try {
            builder = (WidgetDefinitionBuilder)widgetDefinitionBuilderSelector.select(widgetName);
        } catch (ServiceException e) {
            throw new CascadingException("Unknown kind of widget '" + widgetName + "' at " +
                                         DomHelper.getLocation(widgetDefinition), e);
        }
       
       
        return builder.buildWidgetDefinition(widgetDefinition, this.context);
View Full Code Here

                    Element listenerElement = (Element)list.item(i);
                    WidgetListenerBuilder listenerBuilder = null;
                    try {
                        listenerBuilder = (WidgetListenerBuilder)widgetListenerBuilderSelector.select(listenerElement.getLocalName());
                    } catch (ServiceException e) {
                        throw new CascadingException("Unknown kind of eventlistener '" + listenerElement.getLocalName()
                                + "' at " + DomHelper.getLocation(listenerElement), e);
                    }
                    WidgetListener listener = listenerBuilder.buildListener(listenerElement, listenerClass);
                    widgetListenerBuilderSelector.release(listenerBuilder);
                    if (result == null) result = new ArrayList();
View Full Code Here

                    String name = element.getLocalName();
                    WidgetValidatorBuilder builder;
                    try {
                        builder = (WidgetValidatorBuilder)this.widgetValidatorBuilderSelector.select(name);
                    } catch(ServiceException e) {
                        throw new CascadingException("Unknow kind of validator '" + name + "' at " +
                                                     DomHelper.getLocation(element), e);
                    }

                    widgetDefinition.addValidator(builder.build(element, widgetDefinition));
                    widgetValidatorBuilderSelector.release(builder);
View Full Code Here

        String typeName = DomHelper.getAttribute(datatypeElement, "base");
        DatatypeBuilder builder = null;
        try {
            builder = (DatatypeBuilder)typeBuilderSelector.select(typeName);
        } catch (ServiceException e) {
            throw new CascadingException("Unknown datatype '" + typeName + "' specified at " + DomHelper.getLocation(datatypeElement), e);
        }
        return builder.build(datatypeElement, arrayType, this);
    }
View Full Code Here

        String name  = validationRuleElement.getLocalName();
        ValidationRuleBuilder builder = null;
        try {
            builder = (ValidationRuleBuilder)validationRuleBuilderSelector.select(name);
        } catch (ServiceException e) {
            throw new CascadingException("Unknown validation rule \"" + name + "\" specified at " + DomHelper.getLocation(validationRuleElement), e);
        }
        return builder.build(validationRuleElement);
    }
View Full Code Here

        String selector)
        throws CascadingException, JMSException, NamingException {

        if (!this.available) {
            // Connection was not successfully initialized.
            throw new CascadingException("Attempt to register Listener on unavailable JMS Connection");
        }
       
        TopicSubscriber subscriber = null;
        if (this.durableSubscriptionID != null) {
            subscriber =
View Full Code Here

     */
    protected Expression parseExpression(String exprString, Element element, String attrName) throws Exception {
        try {
            return expressionManager.parse(exprString);
        } catch (TokenMgrError e) {
            throw new CascadingException("Error in expression \"" + exprString + "\" in attribute \"" + attrName + "\" at " + DomHelper.getLocation(element), e);
        } catch (Exception e) {
            throw new CascadingException("Error in expression \"" + exprString + "\" in attribute \"" + attrName + "\" at " + DomHelper.getLocation(element), e);
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.CascadingException

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.