velocity-engine-core/src/main/java/org/apache/velocity/runtime/directive/MacroParseException.java [108:177]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        else
        {
            return -1;
        }
    }

    /**
     * This method has the standard behavior when this object has been
     * created using the standard constructors.  Otherwise, it uses
     * "currentToken" and "expectedTokenSequences" to generate a parse
     * error message and returns it.  If this object has been created
     * due to a parse error, and you do not catch it (it gets thrown
     * from the parser), then this method is called during the printing
     * of the final stack trace, and hence the correct error message
     * gets displayed.
     * @return the current message.
     * @since 1.5
     */
    @Override
    public String getMessage()
    {
        if (!specialConstructor)
        {
            StringBuilder sb = new StringBuilder(super.getMessage());
            appendTemplateInfo(sb);
            return sb.toString();
        }

        int maxSize = 0;

        StringBuilder expected = new StringBuilder();

        for (int[] expectedTokenSequence : expectedTokenSequences)
        {
            if (maxSize < expectedTokenSequence.length)
            {
                maxSize = expectedTokenSequence.length;
            }

            for (int i : expectedTokenSequence)
            {
                expected.append(tokenImage[i]).append(" ");
            }

            if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0)
            {
                expected.append("...");
            }

            expected.append(eol).append("    ");
        }

        StringBuilder retval = new StringBuilder("Encountered \"");
        Token tok = currentToken.next;

        for (int i = 0; i < maxSize; i++)
        {
            if (i != 0)
            {
                retval.append(" ");
            }

            if (tok.kind == 0)
            {
                retval.append(tokenImage[0]);
                break;
            }

            retval.append(add_escapes(tok.image));
            tok = tok.next;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



velocity-engine-core/src/main/java/org/apache/velocity/runtime/parser/TemplateParseException.java [149:217]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        else
        {
            return -1;
        }
    }

    /**
     * This method has the standard behavior when this object has been
     * created using the standard constructors.  Otherwise, it uses
     * "currentToken" and "expectedTokenSequences" to generate a parse
     * error message and returns it.  If this object has been created
     * due to a parse error, and you do not catch it (it gets thrown
     * from the parser), then this method is called during the printing
     * of the final stack trace, and hence the correct error message
     * gets displayed.
     * @return The error message.
     */
    @Override
    public String getMessage()
    {
        if (!specialConstructor)
        {
            StringBuilder sb = new StringBuilder(super.getMessage());
            appendTemplateInfo(sb);
            return sb.toString();
        }

        int maxSize = 0;

        StringBuilder expected = new StringBuilder();

        for (int[] expectedTokenSequence : expectedTokenSequences)
        {
            if (maxSize < expectedTokenSequence.length)
            {
                maxSize = expectedTokenSequence.length;
            }

            for (int i : expectedTokenSequence)
            {
                expected.append(tokenImage[i]).append(" ");
            }

            if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0)
            {
                expected.append("...");
            }

            expected.append(eol).append("    ");
        }

        StringBuilder retval = new StringBuilder("Encountered \"");
        Token tok = currentToken.next;

        for (int i = 0; i < maxSize; i++)
        {
            if (i != 0)
            {
                retval.append(" ");
            }

            if (tok.kind == 0)
            {
                retval.append(tokenImage[0]);
                break;
            }

            retval.append(add_escapes(tok.image));
            tok = tok.next;
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



