Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyException


        {
            engine  = context.getProcessEngine();

            if ( this.async != null )
            {
                throw new JellyException( "async attribute only via for non-nested process" );
            }

            spawned = engine.spawn( getProcess(),
                                    context );
        }
View Full Code Here


        {
            if ( state.getActivity() != null
                 &&
                 ! ( state.getActivity() instanceof NoOpActivity ) )
            {
                throw new JellyException( "Activity already defined for state \""
                                          + state.getName()
                                          + "\"" );
            }
        }
View Full Code Here

            throw e;
        }

        if ( e instanceof InvocationTargetException)
        {
            throw new JellyException( ((InvocationTargetException)e).getTargetException(),
                                      fileName,
                                      elementName,
                                      columnNumber,
                                      lineNumber );
        }

        throw new JellyException(e, fileName, elementName, columnNumber, lineNumber);           
    }
View Full Code Here

   
    /**
     * Creates a new Jelly exception, adorning it with location information
     */
    protected JellyException createJellyException(String reason) {
        return new JellyException(
            reason, fileName, elementName, columnNumber, lineNumber
        );
    }
View Full Code Here

            return (JellyException) cause;
        }

        if ( cause instanceof InvocationTargetException)
        {
            return new JellyException(
                reason,
                ((InvocationTargetException)cause).getTargetException(),
                fileName,
                elementName,
                columnNumber,
                lineNumber);
        }

        return new JellyException(
            reason, cause, fileName, elementName, columnNumber, lineNumber
        );
    }
View Full Code Here

   
    // Tag interface
    //-------------------------------------------------------------------------                   
    public void doTag(XMLOutput output) throws Exception {
        if ( var == null ) {
            throw new JellyException( "<define:script> must have a var attribute" );
        }
        context.setVariable( var, getBody() );
    }   
View Full Code Here

        try {
          theClass = Class.forName(className);
        }
                catch (ClassNotFoundException e3) {
                    log.error( "Could not load class: " + className + " exception: " + e, e );
          throw new JellyException(
            "Could not find class: "
              + className
              + " using ClassLoader: "
              + classLoader);
        }
View Full Code Here

                {
                    throw (Exception) inner;
                }
                else
                {
                    throw new JellyException( inner );
                }
            }
        }
    }
View Full Code Here

    // Tag interface
    //-------------------------------------------------------------------------                   
    public void doTag(XMLOutput output) throws Exception {
        DefineBeanTag tag = (DefineBeanTag) findAncestorWithClass( DefineBeanTag.class );
        if ( tag == null ) {
            throw new JellyException( "This tag should be nested inside a <define:bean> or <define:jellybean> tag" );
        }

        tag.addAttribute( attribute );       
    }
View Full Code Here

        else {
            // note this mechanism does not work properly for arbitrarily
            // nested dynamic tags. A better way is required.
            Tag tag = findAncestorWithClass(this, DynamicTag.class);
            if (tag == null) {
                throw new JellyException("Cannot invoke body, no dynamic tag is defined in this block");
            }
            else {
                tag.invokeBody(output);
            }
        }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyException

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.