org.apache.derby.iapi.services.sanity
Class AssertFailure

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.apache.derby.iapi.services.sanity.AssertFailure
All Implemented Interfaces:
java.io.Serializable

public class AssertFailure
extends java.lang.RuntimeException

AssertFailure is raised when an ASSERT check fails. Because assertions are not used in production code, are never expected to fail, and recovering from their failure is expected to be hard, they are under RuntimeException so that no one needs to list them in their throws clauses. An AssertFailure at the outermost system level will result in system shutdown.

See Also:
Serialized Form

Field Summary
private  java.lang.Throwable nestedException
           
 
Fields inherited from class java.lang.RuntimeException
 
Fields inherited from class java.lang.Throwable
 
Constructor Summary
AssertFailure(java.lang.String message)
          This constructor expects no arguments or nested error.
AssertFailure(java.lang.String message, java.lang.Throwable nestedError)
          This constructor takes the pieces of information expected for each error.
 
Method Summary
 void printStackTrace()
           
 void printStackTrace(java.io.PrintStream s)
           
 void printStackTrace(java.io.PrintWriter s)
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

nestedException

private java.lang.Throwable nestedException
Constructor Detail

AssertFailure

public AssertFailure(java.lang.String message,
                     java.lang.Throwable nestedError)
This constructor takes the pieces of information expected for each error.

Parameters:
nestedError - errors can be nested together; if this error has another error associated with it, it is specified here. The 'outermost' error should be the most sever error; inner errors should be providing additional information about what went wrong.

AssertFailure

public AssertFailure(java.lang.String message)
This constructor expects no arguments or nested error.

Method Detail

printStackTrace

public void printStackTrace()

printStackTrace

public void printStackTrace(java.io.PrintStream s)

printStackTrace

public void printStackTrace(java.io.PrintWriter s)


Apache Derby V10.0 Engine Documentation - Copyright © 1997,2004 The Apache Software Foundation or its licensors, as applicable.