Package org.apache.velocity.exception

Examples of org.apache.velocity.exception.ParseErrorException


        {
            nodeTree = RuntimeSingleton.parse( reader, logTag );
        }
        catch ( ParseException pex )
        {
            throw  new ParseErrorException( pex );
        }

        /*
         * now we want to init and render
         */
 
View Full Code Here


        }
        catch( UnsupportedEncodingException  uce )
        {
            String msg = "Unsupported input encoding : " + encoding
                + " for template " + logTag;
            throw new ParseErrorException( msg );
        }

        return evaluate( context, writer, logTag, br );
    }
View Full Code Here

        {
            nodeTree = ri.parse(reader, logTag);
        }
        catch (ParseException pex)
        {
            throw  new ParseErrorException( pex );
        }

        /*
         * now we want to init and render
         */
 
View Full Code Here

            catch( UnsupportedEncodingException  uce )
            {
                String msg = "Template.process : Unsupported input encoding : " + encoding
                + " for template " + name;

                errorCondition  = new ParseErrorException( msg );
                throw errorCondition;
            }
            catch ( ParseException pex )
            {
                /*
                 *  remember the error and convert
                 */
                errorCondition =  new ParseErrorException( pex );
                throw errorCondition;
            }
            catch ( TemplateInitException pex )
            {
                errorCondition = new ParseErrorException( pex );
                throw errorCondition;
            }
            /**
             * pass through runtime exceptions
             */
 
View Full Code Here

        if (idMap == null) {
            // assume null object, and bind all null values

            if (sqlColumns == null || idColumns == null) {
                throw new ParseErrorException("Invalid parameters. "
                        + "Either object has to be set "
                        + "or sqlColumns and idColumns or both.");
            }

            idMap = Collections.EMPTY_MAP;
        }
        else if (sqlColumns == null || idColumns == null) {
            // infer SQL columns from ID columns
            sqlColumns = idMap.keySet().toArray();
            idColumns = sqlColumns;
        }

        Object[] sqlColumnsArray = toArray(sqlColumns);
        Object[] idColumnsArray = toArray(idColumns);

        if (sqlColumnsArray.length != idColumnsArray.length) {
            throw new ParseErrorException(
                    "SQL columns and ID columns arrays have different sizes.");
        }

        for (int i = 0; i < sqlColumnsArray.length; i++) {
View Full Code Here

        }
        else if(object instanceof Map) {
            return (Map) object;
        }
        else if (object != null) {
            throw new ParseErrorException(
                    "Invalid object parameter, expected Persistent or ObjectId or null: "
                            + object);
        }
        else {
            return null;
View Full Code Here

            throws IOException, ResourceNotFoundException, ParseErrorException,
            MethodInvocationException {

        String column = getChildAsString(context, node, 0);
        if (column == null) {
            throw new ParseErrorException("Column name expected at line "
                    + node.getLine()
                    + ", column "
                    + node.getColumn());
        }
View Full Code Here

            // value is null, set JDBC type to NULL
          jdbcType = TypesMapping.getSqlTypeByName(TypesMapping.SQL_NULL);
        }

        if (jdbcType == TypesMapping.NOT_DEFINED) {
            throw new ParseErrorException("Can't determine JDBC type of binding ("
                    + value
                    + ", "
                    + typeString
                    + ") at line "
                    + node.getLine()
View Full Code Here

        {
            nodeTree = parse(reader, logTag);
        }
        catch (ParseException pex)
        {
            throw new ParseErrorException(pex);
        }
        catch (TemplateInitException pex)
        {
            throw new ParseErrorException(pex);
        }

        if (nodeTree == null)
        {
            return false;
View Full Code Here

            {
                nodeTree.init(ica, this);
            }
            catch (TemplateInitException pex)
            {
                throw new ParseErrorException(pex);
            }
            /**
             * pass through application level runtime exceptions
             */
            catch(RuntimeException e)
View Full Code Here

TOP

Related Classes of org.apache.velocity.exception.ParseErrorException

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.