Package freemarker.core

Examples of freemarker.core.InvalidReferenceException


            num = ((TemplateNumberModel) model).getAsNumber();
        } catch (ClassCastException e) {
            throw new TemplateException(
                    "Expecting a number on the left side of ?c", env);
        } catch (NullPointerException e) {
            throw new InvalidReferenceException("Undefined number", env);
        }
        if (num instanceof Integer) {
            // We accelerate this fairly common case
            return new SimpleScalar(num.toString());
        } else {
View Full Code Here


    }
    private void fillInDefaultsInternal(Environment env, Scope scope, Collection<String> paramNames) throws TemplateException {
       
        boolean resolvedAnArg, hasUnresolvedArg;
        Expression firstUnresolvedExpression;
        InvalidReferenceException firstReferenceException;
        do {
            firstUnresolvedExpression = null;
            firstReferenceException = null;
            resolvedAnArg = hasUnresolvedArg = false;
            for (String paramName : paramNames) {
View Full Code Here

    public void execute(Environment env) throws TemplateException, IOException {
        String templateNameString = includedTemplateName.getStringValue(env);
        if( templateNameString == null ) {
            String msg = "Error " + getStartLocation()
                        + "The expression " + includedTemplateName + " is undefined.";
            throw new InvalidReferenceException(msg, env);
        }
        String enc = encoding;
        if (encoding == null && encodingExp != null) {
            enc = encodingExp.getStringValue(env);
        }
View Full Code Here

TOP

Related Classes of freemarker.core.InvalidReferenceException

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.