1 20 package org.apache.cactus.internal.client; 21 22 import java.io.PrintStream ; 23 import java.io.PrintWriter ; 24 25 39 public class ServletExceptionWrapper extends Throwable 40 { 41 45 private String stackTrace; 46 47 50 private String className; 51 52 57 public ServletExceptionWrapper(String theMessage) 58 { 59 super(theMessage); 60 } 61 62 65 public ServletExceptionWrapper() 66 { 67 super(); 68 } 69 70 77 public ServletExceptionWrapper(String theMessage, String theClassName, 78 String theStackTrace) 79 { 80 super(theMessage); 81 this.className = theClassName; 82 this.stackTrace = theStackTrace; 83 } 84 85 90 public void printStackTrace(PrintStream thePs) 91 { 92 if (this.stackTrace == null) 93 { 94 thePs.print(getMessage()); 95 } 96 else 97 { 98 thePs.print(this.stackTrace); 99 } 100 } 101 102 107 public void printStackTrace(PrintWriter thePw) 108 { 109 if (this.stackTrace == null) 110 { 111 thePw.print(getMessage()); 112 } 113 else 114 { 115 thePw.print(this.stackTrace); 116 } 117 } 118 119 122 public String getWrappedClassName() 123 { 124 return this.className; 125 } 126 } 127 | Popular Tags |