Class SARLBoundException

All Implemented Interfaces:
Serializable

public class SARLBoundException extends SARLException
An exception that occurs when an index is out of bounds. Typically, this means an array index, though this class uses only a general notion of an index being out of bounds.
See Also:
  • Field Details

    • expr

      public SymbolicExpression expr
      The symbolic expression into which the index points (typically, an array)
    • index

      public NumericExpression index
      The offending index
    • lowerBound

      public NumericExpression lowerBound
      The lowest value that an index should take; can be null, representing "unknown"
    • upperBound

      public NumericExpression upperBound
      The greatest value that an index should take; can be null, representing "unknown"
    • location

      public String location
      The kind of operation that resulted in the exception, e.g., "an array write operation" or "an array read operation"
  • Constructor Details

    • SARLBoundException

      public SARLBoundException(SymbolicExpression expr, NumericExpression index, NumericExpression lowerBound, NumericExpression upperBound, String location)
      Constructs new out-of-bounds exception with a message formed from the given parameters.
      Parameters:
      expr - the symbolic expression into which the index points (typically, an array)
      index - the offending index
      lowerBound - the lowest value that an index should take; can be null, representing "unknown"
      upperBound - the greatest value that an index should take; can be null, representing "unknown"
      location - the kind of operation that resulted in the exception, e.g., "an array write operation" or "an array read operation"