1 64 65 package com.jcorporate.expresso.services.html; 66 67 72 73 import java.io.PrintWriter ; 74 75 76 80 public class StackTrace 81 extends HtmlElement { 82 private String thisClass = (this.getClass().getName() + "."); 83 private Throwable t = null; 84 85 88 public StackTrace() 89 throws HtmlException { 90 super(); 91 92 String myName = (thisClass + "StackTrace()"); 93 throw new HtmlException(myName + 94 ":Must be created with StackTrace(Throwable)"); 95 } 96 97 102 public StackTrace(Throwable newT) 103 throws HtmlException { 104 super(newT.getMessage()); 105 106 t = newT; 107 } 108 109 113 protected void display(PrintWriter out, int depth) 114 throws HtmlException { 115 out.println("<!-- <br /><hr><pre>"); 116 t.printStackTrace(out); 117 out.println("</pre><hr> -->"); 118 setDisplayed(); 119 } 120 121 122 } 123 | Popular Tags |