1 16 19 20 package org.apache.pluto.portalImpl.xml; 21 22 28 29 public class XmlException extends java.lang.Exception 30 { 31 32 private Throwable throwable = null; 33 34 37 38 public XmlException () 39 { 40 super(); 41 } 42 43 49 50 public XmlException (String text) 51 { 52 super(text); 53 } 54 55 65 66 public XmlException (String text, Throwable cause) 67 { 68 super (text); 69 throwable = cause; 70 } 71 72 80 81 public XmlException (Throwable cause) 82 { 83 super(cause.getLocalizedMessage()); 84 throwable = cause; 85 } 86 87 95 96 public Throwable getRootCause() 97 { 98 return throwable; 99 } 100 101 104 public void printStackTrace() 105 { 106 this.printStackTrace(System.err); 107 } 108 109 114 public void printStackTrace(java.io.PrintStream out) 115 { 116 this.printStackTrace(new java.io.PrintWriter (out, true)); 117 } 118 119 124 public void printStackTrace(java.io.PrintWriter out) 125 { 126 super.printStackTrace(out); 127 128 if( getRootCause () != null ) 129 { 130 out.println(); 131 out.print("Nested Exception is "); 132 getRootCause ().printStackTrace(out); 133 } 134 } 135 136 } 137 | Popular Tags |