org.oreodata.util
Class AssertionFailedException

java.lang.Object
  |
  +--java.lang.Throwable
        |
        +--java.lang.Exception
              |
              +--java.lang.RuntimeException
                    |
                    +--org.oreodata.util.AssertionFailedException
All Implemented Interfaces:
java.io.Serializable

public class AssertionFailedException
extends java.lang.RuntimeException

Runtime exception to indicate that an assertion has failed. Now allows wrapping of exceptions, useful for tunnelling of a checked exception in an assertion.

Author:
Jonathan Revusky
See Also:
Serialized Form

Constructor Summary
AssertionFailedException()
           
AssertionFailedException(java.lang.String message)
           
AssertionFailedException(java.lang.String message, java.lang.Throwable t)
          Create a new AssertionFailedException from an existing exception.
AssertionFailedException(java.lang.Throwable t)
          Create a new AssertionFailedException wrapping an existing exception.
 
Method Summary
 java.lang.Throwable getNested()
          the wrapped exception (or null)
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AssertionFailedException

public AssertionFailedException()

AssertionFailedException

public AssertionFailedException(java.lang.String message)

AssertionFailedException

public AssertionFailedException(java.lang.Throwable t)
Create a new AssertionFailedException wrapping an existing exception.

The existing exception will be embedded in the new one, and its message will become the default message for the AssertionFailedException.

Parameters:
t - The exception or error to be wrapped in an AssertionFailedException.

AssertionFailedException

public AssertionFailedException(java.lang.String message,
                                java.lang.Throwable t)
Create a new AssertionFailedException from an existing exception.

The existing exception will be embedded in the new one, but the new exception will have its own message.

Parameters:
message - The detail message.
t - The exception/error to be wrapped in an AssertionFailedException.
Method Detail

getNested

public java.lang.Throwable getNested()
the wrapped exception (or null)