org.apache.maven.surefire.battery.assertion
Class BatteryTestFailedException

java.lang.Object
  extended byjava.lang.Throwable
      extended byjava.lang.Exception
          extended byjava.lang.RuntimeException
              extended byorg.apache.maven.surefire.battery.assertion.BatteryTestFailedException
All Implemented Interfaces:
java.io.Serializable

public class BatteryTestFailedException
extends java.lang.RuntimeException

Exception that indicates a test failed.

Author:
Bill Venners
See Also:
Serialized Form

Constructor Summary
BatteryTestFailedException()
          Create a TestFailedException with no detail message.
BatteryTestFailedException(java.lang.String message)
          Create a TestFailedException with a detail message.
BatteryTestFailedException(java.lang.String message, java.lang.Throwable cause)
          Create a TestFailedException with the specified detail message and cause.
BatteryTestFailedException(java.lang.Throwable cause)
          Create a TestFailedException with the specified cause.
 
Method Summary
 java.lang.Throwable getCause()
          Returns the cause of this TestFailedException, or null if the cause is nonexistent or unknown.
 java.lang.Throwable initCause(java.lang.Throwable cause)
          Initializes the cause of this TestFailedException to the specified value.
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getMessage, getStackTrace, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BatteryTestFailedException

public BatteryTestFailedException()
Create a TestFailedException with no detail message.


BatteryTestFailedException

public BatteryTestFailedException(java.lang.String message)
Create a TestFailedException with a detail message.

Parameters:
message - A detail message for this TestFailedException, or null. If null is passed, the getMessage method will return an empty String.

BatteryTestFailedException

public BatteryTestFailedException(java.lang.String message,
                                  java.lang.Throwable cause)
Create a TestFailedException with the specified detail message and cause.

Note that the detail message associated with cause is not automatically incorporated in this throwable's detail message.

Parameters:
message - A detail message for this TestFailedException, or null.
cause - the cause, which is saved for later retrieval by the getCause method. (A null value is permitted, and indicates that the cause is nonexistent or unknown.)

BatteryTestFailedException

public BatteryTestFailedException(java.lang.Throwable cause)
Create a TestFailedException with the specified cause. The getMessage method of this exception object will return (cause == null ? "" : cause.toString()).

Method Detail

getCause

public java.lang.Throwable getCause()
Returns the cause of this TestFailedException, or null if the cause is nonexistent or unknown. (The cause is the Throwable that caused this TestFailedException to get thrown.)


initCause

public java.lang.Throwable initCause(java.lang.Throwable cause)
Initializes the cause of this TestFailedException to the specified value. (The cause is the Throwable that caused this TestFailedException to get thrown.) This method can be called at most once. It is generally called immediately after creating the TestFailedException. If this TestFailedException was created with TestFailedException(Throwable) or TestFailedException(String, Throwable), this method cannot be called even once.

Parameters:
cause - the cause (which is saved for later retrieval by the getCause() method). A null value is permitted, and indicates that the cause is nonexistent or unknown.)
Throws:
java.lang.IllegalArgumentException - - if cause is this TestFailedException. (A TestFailedException cannot be its own cause.)
java.lang.IllegalStateException - if this TestFailedException was created with TestFailedException(Throwable) or TestFailedException(String, Throwable), or this method has already been called on this TestFailedException.


Copyright © 2004-2006 Apache. All Rights Reserved.