1 6 7 package javax.portlet; 8 9 10 11 16 17 public class PortletException extends java.lang.Exception 18 { 19 20 private Throwable _cause; 21 22 23 26 27 public PortletException () 28 { 29 super(); 30 } 31 32 39 40 public PortletException (String text) 41 { 42 super (text); 43 } 44 45 59 60 public PortletException (String text, Throwable cause) 61 { 62 super(text); 63 _cause = cause; 64 } 66 67 75 76 public PortletException (Throwable cause) 77 { 78 _cause = cause; 79 } 81 82 85 public void printStackTrace() 86 { 87 this.printStackTrace(System.err); 88 } 89 90 95 public void printStackTrace(java.io.PrintStream out) 96 { 97 this.printStackTrace(new java.io.PrintWriter (out, true)); 98 } 99 100 105 public void printStackTrace(java.io.PrintWriter out) 106 { 107 super.printStackTrace(out); 108 109 if( getCause () != null ) { 110 out.println(); 111 out.print("Nested Exception is "); 112 getCause ().printStackTrace(out); 113 } 114 125 } 126 127 138 public Throwable getCause() { 139 return (_cause!=null ? _cause : null); 140 } 141 142 } 143 | Popular Tags |