freemarker.core.Environment.outputInstructionStack()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(2.8k)|赞(0)|评价(0)|浏览(132)

本文整理了Java中freemarker.core.Environment.outputInstructionStack()方法的一些代码示例,展示了Environment.outputInstructionStack()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Environment.outputInstructionStack()方法的具体详情如下:
包路径:freemarker.core.Environment
类名称:Environment
方法名:outputInstructionStack

Environment.outputInstructionStack介绍

[英]Prints the current FTL stack trace. Useful for debugging. TemplateExceptions incorporate this information in their stack traces.
[中]打印当前FTL堆栈跟踪。用于调试。TemplateException将此信息合并到其堆栈跟踪中。

代码示例

代码示例来源:origin: org.freemarker/freemarker

  1. public static void outputInstructionStack(
  2. TemplateElement[] instructionStackSnapshot, boolean terseMode, Writer pw) {
  3. Environment.outputInstructionStack(instructionStackSnapshot, terseMode, pw);
  4. }

代码示例来源:origin: org.freemarker/freemarker

  1. /**
  2. * Prints the current FTL stack trace. Useful for debugging. {@link TemplateException}s incorporate this information
  3. * in their stack traces.
  4. */
  5. public void outputInstructionStack(PrintWriter pw) {
  6. outputInstructionStack(getInstructionStackSnapshot(), false, pw);
  7. pw.flush();
  8. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

  1. public static void outputInstructionStack(
  2. TemplateElement[] instructionStackSnapshot, boolean terseMode, Writer pw) {
  3. Environment.outputInstructionStack(instructionStackSnapshot, terseMode, pw);
  4. }

代码示例来源:origin: org.freemarker/freemarker-gae

  1. public static void outputInstructionStack(
  2. TemplateElement[] instructionStackSnapshot, boolean terseMode, Writer pw) {
  3. Environment.outputInstructionStack(instructionStackSnapshot, terseMode, pw);
  4. }

代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.freemarker

  1. /**
  2. * Prints the current FTL stack trace. Useful for debugging. {@link TemplateException}s incorporate this information
  3. * in their stack traces.
  4. */
  5. public void outputInstructionStack(PrintWriter pw) {
  6. outputInstructionStack(getInstructionStackSnapshot(), false, pw);
  7. pw.flush();
  8. }

代码示例来源:origin: org.freemarker/freemarker-gae

  1. /**
  2. * Prints the current FTL stack trace. Useful for debugging. {@link TemplateException}s incorporate this information
  3. * in their stack traces.
  4. */
  5. public void outputInstructionStack(PrintWriter pw) {
  6. outputInstructionStack(getInstructionStackSnapshot(), false, pw);
  7. pw.flush();
  8. }

代码示例来源:origin: org.freemarker/com.springsource.freemarker

  1. /**
  2. * Constructs a TemplateException with both a description of the error
  3. * that occurred and the underlying Exception that caused this exception
  4. * to be raised.
  5. *
  6. * @param description the description of the error that occurred
  7. * @param cause the underlying <code>Exception</code> that caused this
  8. * exception to be raised
  9. */
  10. public TemplateException(String description, Exception cause, Environment env) {
  11. super(getDescription(description, cause));
  12. causeException = cause;
  13. this.env = env;
  14. if(env != null)
  15. {
  16. StringWriter sw = new StringWriter();
  17. PrintWriter pw = new PrintWriter(sw);
  18. env.outputInstructionStack(pw);
  19. pw.flush();
  20. ftlInstructionStack = sw.toString();
  21. }
  22. else
  23. {
  24. ftlInstructionStack = "";
  25. }
  26. }

相关文章

Environment类方法