Package cambridge

Examples of cambridge.TemplateEvaluationException


            } else if (o instanceof char[]) {
                iterateChar(bindings, tag, out, (char[]) o);
            } else if (o instanceof boolean[]) {
                iterateBoolean(bindings, tag, out, (boolean[]) o);
            } else {
                throw new TemplateEvaluationException(null, "The provided expression value of class " +
                        o.getClass().getName() + " for foreach attribute is not iterable, on line: "
                        + tag.getBeginLine() + ", column: " + tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn());
            }

        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " + e.getMessage(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here


                bindings.put(Expressions.ITER_OBJECT, iter);
                tag.execute(bindings, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
                    tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

   public void eval(ExpressionContext context, Writer out) throws IOException, TemplateEvaluationException {
      try {
         context.put(varName, expression.eval(context));
      } catch (ExpressionEvaluationException e) {
         throw new TemplateEvaluationException(e, "Could not execute the expression: " + expression.toString() + " on line: " + getBeginLine() + ", column: " + getBeginColumn(), getBeginLine(), getBeginColumn());
      }
   }
View Full Code Here

                context.put(Expressions.ITER_OBJECT, iter);
                tag.execute(context, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
                    tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

            } else if (o instanceof char[]) {
                iterateChar(context, tag, out, (char[]) o);
            } else if (o instanceof boolean[]) {
                iterateBoolean(context, tag, out, (boolean[]) o);
            } else {
                throw new TemplateEvaluationException(null, "The provided expression value of class " +
                        o.getClass().getName() + " for foreach attribute is not iterable, on line: "
                        + tag.getBeginLine() + ", column: " + tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn());
            }

        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " + e.getMessage(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

                } else {
                    out.write(EscapeFilter.doFilter(str));
                }
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                       e.getMessage() + ", on line: " + getLine() + ", column: " +
                       getColumn(), getLine(), getColumn());

        }
    }
View Full Code Here

                } else {
                    out.write(EscapeFilter.doFilter(str));
                }
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + getBeginLine() + ", column: " +
                    getBeginColumn(), getBeginLine(), getBeginColumn(), value);
        }
    }
View Full Code Here

                context.put(Expressions.ITER_OBJECT, iter);
                tag.execute(context, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
                    tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

                context.put(Expressions.ITER_OBJECT, iter);
                tag.execute(context, out);
                iter.next();
            }
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " + e.getMessage() +
                    ", on line: " + tag.getBeginLine() + ", column: " + tag.getBeginColumn(),
                    tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

    protected void doExecute(ExpressionContext context, TagNode tag, Writer out) throws TemplateEvaluationException, IOException {
        try {
            context.put(getCurrentObjectName(), expression.eval(context));
            tag.execute(context, out);
        } catch (ExpressionEvaluationException e) {
            throw new TemplateEvaluationException(e, "Could not execute the expression: " +
                    e.getMessage() + ", on line: " + tag.getBeginLine() + ", column: " +
                    tag.getBeginColumn(), tag.getBeginLine(), tag.getBeginColumn(), tag.getTagName());
        }
    }
View Full Code Here

TOP

Related Classes of cambridge.TemplateEvaluationException

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.