Package freemarker.template

Examples of freemarker.template.TemplateException$PrintStreamStackTraceWriter


                return new CurriedMethodEx((TemplateMethodModelEx)base, parameterList);
            }
            if(base instanceof TemplateMethodModel) {
                return new CurriedMethod((TemplateMethodModel)base, parameterList);
            }
            throw new TemplateException("curry can only be applied to a macro, " +
                    "to a transform, or to a method. You tried to apply it to an " +
                    "instance of " + base.getClass().getName() +
                    " which is neither of the above", Environment.getCurrentEnvironment());
        }
View Full Code Here


            TemplateTestCase.compare(reference, output, refFile, outFile);
//            showTestResults( referenceText, resp.toString() );
        }
        catch(Exception e) {
            e.printStackTrace();
            throw new TemplateException(e, null);
        }
    }
View Full Code Here

    this.description = description;
  }

  @Override
  public void execute(Environment env) throws TemplateException, IOException {
    throw new TemplateException(description, env); // We should typically have failed before this point anyway.
  }
View Full Code Here

                try {
                    TemplateNamespace ns = env.importLib(s, null);
                    result.add(ns);
                }
                catch (IOException ioe) {
                    throw new TemplateException("Could not import library '" + s + "', " + ioe.getMessage(), env);
                }
            }
            else {
                result.add(val.get(i));
            }
View Full Code Here

            Map params, TemplateModel[] loopVars,
            TemplateDirectiveBody body) throws TemplateException, IOException {
   
    TemplateDirectiveBodyOverrideWraper current = (TemplateDirectiveBodyOverrideWraper)env.getVariable(DirectiveUtils.OVERRIDE_CURRENT_NODE);
    if(current == null) {
      throw new TemplateException("<@super/> direction must be child of override", env);
    }
    TemplateDirectiveBody parent = current.parentBody;
    if(parent == null) {
      throw new TemplateException("not found parent for <@super/>", env);
    }
    parent.render(env.getOut());
   
  }
View Full Code Here

    if (result != null) {
      try {
        env.getOut().write(result);
      } catch (IOException ex) {
        throw new TemplateException("Error writing [" + result + "] to Freemarker.", ex, env);
      }
    } else {
      renderBody(env, body);
    }
  }
View Full Code Here

    if (result != null) {
      try {
        env.getOut().write(result);
      } catch (IOException ex) {
        throw new TemplateException("Error writing [" + result + "] to Freemarker.", ex, env);
      }
    } else {
      renderBody(env, body);
    }
  }
View Full Code Here

    // Print out the principal value if not null
    if (result != null) {
      try {
        env.getOut().write(result);
      } catch (IOException ex) {
        throw new TemplateException("Error writing [" + result + "] to Freemarker.", ex, env);
      }
    }
  }
View Full Code Here

    // Print out the principal value if not null
    if (result != null) {
      try {
        env.getOut().write(result);
      } catch (IOException ex) {
        throw new TemplateException("Error writing [" + result + "] to Freemarker.", ex, env);
      }
    }
  }
View Full Code Here

    if (result != null) {
      try {
        env.getOut().write(result);
      } catch (IOException ex) {
        throw new TemplateException("Error writing [" + result + "] to Freemarker.", ex, env);
      }
    } else {
      renderBody(env, body);
    }
  }
View Full Code Here

TOP

Related Classes of freemarker.template.TemplateException$PrintStreamStackTraceWriter

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.