org.scalatest

TestFailedException

class TestFailedException extends StackDepthException

Exception that indicates a test failed. The purpose of this exception is to encapsulate information about the stack depth at which the line of test code that failed resides, so that information can be presented to the user that makes it quick to find the failing line of test code. (In other words, the user need not scan through the stack trace to find the correct filename and line number of the failing test.)

known subclasses: PropertyTestFailedException
    authors:
  1. Bill Venners

Inherited
  1. Hide All
  2. Show all
  1. StackDepthException
  2. StackDepth
  3. RuntimeException
  4. Exception
  5. Throwable
  6. Serializable
  7. AnyRef
  8. Any
Visibility
  1. Public
  2. All

Instance constructors

  1. new TestFailedException(message: String, cause: Throwable, failedCodeStackDepth: Int)

    Create a TestFailedException with the specified stack depth, detail message, and cause.

  2. new TestFailedException(cause: Throwable, failedCodeStackDepth: Int)

    Create a TestFailedException with the specified stack depth and cause.

  3. new TestFailedException(message: String, failedCodeStackDepth: Int)

    Create a TestFailedException with a specified stack depth and detail message.

  4. new TestFailedException(failedCodeStackDepth: Int)

    Create a TestFailedException with specified stack depth and no detail message or cause.

  5. new TestFailedException(message: Option[String], cause: Option[Throwable], failedCodeStackDepth: Int)

Value Members

  1. def !=(arg0: AnyRef): Boolean

  2. def !=(arg0: Any): Boolean

    o != arg0 is the same as !(o == (arg0)).

  3. def ##(): Int

  4. def $asInstanceOf[T0](): T0

  5. def $isInstanceOf[T0](): Boolean

  6. def ==(arg0: AnyRef): Boolean

    o == arg0 is the same as if (o eq null) arg0 eq null else o.equals(arg0).

  7. def ==(arg0: Any): Boolean

    o == arg0 is the same as o.equals(arg0).

  8. def asInstanceOf[T0]: T0

    This method is used to cast the receiver object to be of type T0.

  9. def clone(): AnyRef

    This method creates and returns a copy of the receiver object.

  10. def eq(arg0: AnyRef): Boolean

    This method is used to test whether the argument (arg0) is a reference to the receiver object (this).

  11. def equals(arg0: Any): Boolean

    This method is used to compare the receiver object (this) with the argument object (arg0) for equivalence.

  12. val failedCodeFileNameAndLineNumberString: Option[String]

    A string that provides the filename and line number of the line of code that failed, suitable for presenting to a user, which is taken from this exception's StackTraceElement at the depth specified by failedCodeStackDepth.

  13. val failedTestCodeFileNameAndLineNumberString: Option[String]

    failedTestCodeFileNameAndLineNumberString has been deprecated and will be removed in a future version of ScalaTest.

  14. val failedTestCodeStackDepth: Int

    failedTestCodeStackDepth has been deprecated and will be removed in a future version of ScalaTest.

  15. def fillInStackTrace(): Throwable

  16. def finalize(): Unit

    This method is called by the garbage collector on the receiver object when garbage collection determines that there are no more references to the object.

  17. def getCause(): Throwable

  18. def getClass(): java.lang.Class[_ <: java.lang.Object]

    Returns a representation that corresponds to the dynamic class of the receiver object.

  19. def getLocalizedMessage(): String

  20. def getMessage(): String

  21. def getStackTrace(): Array[StackTraceElement]

  22. def hashCode(): Int

    Returns a hash code value for the object.

  23. def initCause(throwable: Throwable): Throwable

  24. def isInstanceOf[T0]: Boolean

    This method is used to test whether the dynamic type of the receiver object is T0.

  25. def ne(arg0: AnyRef): Boolean

    o.ne(arg0) is the same as !(o.eq(arg0)).

  26. def notify(): Unit

    Wakes up a single thread that is waiting on the receiver object's monitor.

  27. def notifyAll(): Unit

    Wakes up all threads that are waiting on the receiver object's monitor.

  28. def printStackTrace(arg0: PrintWriter): Unit

  29. def printStackTrace(arg0: PrintStream): Unit

  30. def printStackTrace(): Unit

  31. def setStackTrace(arg0: Array[StackTraceElement]): Unit

  32. def synchronized[T0](arg0: T0): T0

  33. def toString(): String

    Returns a string representation of the object.

  34. def wait(): Unit

  35. def wait(arg0: Long, arg1: Int): Unit

  36. def wait(arg0: Long): Unit