## com.gargoylesoftware.htmlunit
Class ObjectInstantiationException

    java.lang.Object
      java.lang.Throwable
          java.lang.Exception
              java.lang.RuntimeException
                  com.gargoylesoftware.htmlunit.ObjectInstantiationException

All Implemented Interfaces:
  java.io.Serializable

    public class ObjectInstantiationException

extends java.lang.RuntimeException

Thrown if an object could not be instantiated for some reason.

Version:
  $Revision: 4002 $
Author:
  Mike Bowler
See Also:
  Serialized Form

Constructor Summary
`ObjectInstantiationException(java.lang.String message, java.lang.Throwable cause)` Creates a new instance.

Method Summary
`java.lang.Throwable` `getCauseException()` Returns the exception that had been thrown during instantiation of the object.
`void` `printStackTrace(java.io.PrintStream stream)` Print the stack trace.
`void` `printStackTrace(java.io.PrintWriter writer)` Print the stack trace.

Methods inherited from class java.lang.Throwable
`fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, setStackTrace, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### ObjectInstantiationException

    public ObjectInstantiationException(java.lang.String message,
                                        java.lang.Throwable cause)

  Creates a new instance.

  Parameters:
    `message` - a message explaining the failure
    `cause` - the exception that was thrown

Method Detail

### getCauseException

    public java.lang.Throwable getCauseException()

  Returns the exception that had been thrown during instantiation of the object.

  Returns:
    the cause exception

### printStackTrace

    public void printStackTrace(java.io.PrintWriter writer)

  Print the stack trace. If this exception contains another exception then the stack traces for both will be printed.

  Overrides:
    `printStackTrace` in class `java.lang.Throwable`
  Parameters:
    `writer` - Where the stack trace will be written

### printStackTrace

    public void printStackTrace(java.io.PrintStream stream)

  Print the stack trace. If this exception contains another exception then the stack traces for both will be printed.

  Overrides:
    `printStackTrace` in class `java.lang.Throwable`
  Parameters:
    `stream` - Where the stack trace will be written

Copyright © 2002-2011 Gargoyle Software Inc.. All Rights Reserved.