Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 38 package com.gargoylesoftware.htmlunit; 39 40 import java.io.PrintWriter ; 41 import java.io.PrintStream ; 42 43 49 public class ObjectInstantiationException extends RuntimeException { 50 private static final long serialVersionUID = 8831953284047722098L; 51 private final Throwable causeException_; 52 53 54 59 public ObjectInstantiationException( final String message, final Throwable cause ) { 60 super(message); 61 causeException_ = cause; 62 } 63 64 65 69 public Throwable getCauseException() { 70 return causeException_; 71 } 72 73 74 80 public void printStackTrace( final PrintWriter writer ) { 81 super.printStackTrace( writer ); 82 if( causeException_ != null ) { 83 writer.write( "Enclosed exception: " ); 84 causeException_.printStackTrace( writer ); 85 } 86 } 87 88 89 95 public void printStackTrace( final PrintStream stream ) { 96 super.printStackTrace( stream ); 97 if( causeException_ != null ) { 98 stream.print( "Enclosed exception: " ); 99 causeException_.printStackTrace( stream ); 100 } 101 } 102 } 103
| Popular Tags
|