Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyTagException


                String bodyText = getSourceCode((Element)content);
                highlight(xmlOutput, StringEscapeUtils.unescapeXml(bodyText));
            }
            catch (SAXException e)
            {
                throw new JellyTagException("Unable to print out highlighted body text: " + e);
            }
        }
        else
        {
            throw new JellyTagException("Not an XML element: " + getValue());
        }
    }
View Full Code Here


            xmlWriter.flush();
            xmlWriter.close();
        }
        catch (IOException ioe)
        {
            throw new JellyTagException("Unable parse source for syntax highlighting: ");
        }

        return stringWriter.getBuffer().toString();
    }
View Full Code Here

                try {
                    output.startElement(tagName,actual);
                    getTagBody().run(context,output);
                    output.endElement(tagName);
                } catch (SAXException x) {
                    throw new JellyTagException(x);
                }
            }
        };
    }
View Full Code Here

        try {
            chain.doFilter(request,response);
        } catch (ServletException e) {
            Throwable t = e.getRootCause();
            if (t instanceof JellyTagException) {
                JellyTagException jte = (JellyTagException) t;
                Throwable cause = jte.getCause();
                if (cause instanceof AcegiSecurityException) {
                    AcegiSecurityException se = (AcegiSecurityException) cause;
                    throw new ServletException(se);
                }
            }
View Full Code Here

    {
        if ( value == null || "".equals( value.trim() ) )
        {
            if ( fail )
            {
                throw new JellyTagException( getMessage() );
            }
            else
            {
                System.out.println( getMessage() );
            }
View Full Code Here

                    getContext().setVariable( MavenConstants.FAILED_PROJECTS, c );
                }
                return;
            }

            throw new JellyTagException( e );
        }
    }
View Full Code Here

        checkAttribute( user, "user" );

        user = user.trim();
        if ( "".equals( user ) || UserCheck.NO_VALUE.equals( user ) )
        {
            throw new JellyTagException( UserCheck.ERROR );
        }
    }
View Full Code Here

        {
            manager.installPlugin( file, null, cache );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "error installing plugin", e );
        }
    }
View Full Code Here

    {
        WerkzProject project = getProject();

        if ( project == null )
        {
            throw new JellyTagException( "No Project available" );
        }

        invokeBody( output );

        try
        {
            // Lazy goal loading
            Session session = createSession();
            MavenJellyContext baseContext = (MavenJellyContext) session.getAttribute( PluginManager.BASE_CONTEXT );
            GoalToJellyScriptHousingMapper mapper = (GoalToJellyScriptHousingMapper) session
                .getAttribute( PluginManager.GOAL_MAPPER );
            PluginManager pluginManager = (PluginManager) session.getAttribute( PluginManager.PLUGIN_MANAGER );

            Set pluginSet;
            try
            {
                pluginSet = pluginManager.prepAttainGoal( getName(), baseContext, mapper );
            }
            catch ( Exception e )
            {
                throw new JellyTagException( e );
            }
            project.attainGoal( getName(), session );
            pluginManager.addDelayedPops( pluginSet );
        }
        catch ( UnattainableGoalException e )
        {
            Throwable root = e.getRootCause();

            if ( root != null )
            {
                if ( root instanceof JellyTagException )
                {
                    throw (JellyTagException) root;
                }
                if ( root instanceof UnattainableGoalException )
                {
                    throw new JellyTagException( e );
                }
            }
            e.fillInStackTrace();
            throw new JellyTagException( e );
        }
        catch ( NoActionDefinitionException e )
        {
            throw new JellyTagException( e );
        }
        catch ( NoSuchGoalException e )
        {
            throw new JellyTagException( e );
        }
    }
View Full Code Here

            fos.flush();
            fos.close();
        }
        catch ( IOException e )
        {
            throw new JellyTagException( e );
        }
    }
View Full Code Here

TOP

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

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.