Class SequenceExceptionError

java.lang.Object
java.lang.Throwable
java.lang.Error
randoop.sequence.SequenceExceptionError
All Implemented Interfaces:
Serializable

public class SequenceExceptionError extends Error
Exception representing occurrence of a "flaky" test sequence where an exception was thrown by a statement other than the last of the sequence. Occurs when a statement in an input sequence, that previously terminated normally, throws an exception. Includes information needed to report the error.
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      ID for serialization.
      See Also:
    • e

      private Throwable e
      The exception thrown by the sequence.
    • testSequence

      private ExecutableSequence testSequence
      The test sequence.
    • position

      private int position
      The position of the statement that threw the exception.
  • Constructor Details

    • SequenceExceptionError

      public SequenceExceptionError(ExecutableSequence testSequence, int position, Throwable exception)
      Create an exception for the exception thrown by the statement at the given position in the test sequence.
      Parameters:
      testSequence - the test sequence
      position - the position of the statement that threw the exception
      exception - the exception
  • Method Details

    • getError

      public Throwable getError()
      Returns the thrown exception.
      Returns:
      the exception thrown by statement in sequence
    • getStatement

      public String getStatement()
      Returns the string representation of the statement that threw the exception.
      Returns:
      the string representation of the statement
    • getSequence

      public String getSequence()
      Returns the string representation of the test sequence.
      Returns:
      the full test sequence as a string
    • getSubsequence

      public Sequence getSubsequence()
      Returns the input sequence containing the statement that threw the exception.
      Returns:
      the input sequence from which exception was thrown