Skip to content

Record Class IrisError.ReadError

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

java.lang.Object
java.lang.Record
dev.gecode.iris.IrisError.ReadError
Record Components:
code - the stable code of the error
message - the main diagnostic text
inputLocation - the location in the input, or null if the error has none
specLocation - the location in the reader spec, or null if the error has none
context - the execution context, outermost first, or null if the error has none
All Implemented Interfaces:
IrisError, Serializable
Enclosing interface:
IrisError
public static record IrisError.ReadError(ErrorCode code, String message, @Nullable Location inputLocation, @Nullable Location specLocation, @Nullable String context) extends Record implements IrisError
An error found while reading an input.
  • Constructor Details

    • ReadError

      public ReadError(ErrorCode code, String message, @Nullable Location inputLocation, @Nullable Location specLocation, @Nullable String context)
      Creates an instance of a ReadError record class.
      Parameters:
      code - the value for the code record component
      message - the value for the message record component
      inputLocation - the value for the inputLocation record component
      specLocation - the value for the specLocation record component
      context - the value for the context record component
  • Method Details

    • recordPath

      public @Nullable List<Integer> recordPath()
      Description copied from interface: IrisError
      Returns the indices of a failed check's witness, or null for any other error.
      Specified by:
      recordPath in interface IrisError
      Returns:
      the indices of a failed check's witness, or null for any other error
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • code

      public ErrorCode code()
      Returns the value of the code record component.
      Specified by:
      code in interface IrisError
      Returns:
      the value of the code record component
    • message

      public String message()
      Returns the value of the message record component.
      Specified by:
      message in interface IrisError
      Returns:
      the value of the message record component
    • inputLocation

      public @Nullable Location inputLocation()
      Returns the value of the inputLocation record component.
      Specified by:
      inputLocation in interface IrisError
      Returns:
      the value of the inputLocation record component
    • specLocation

      public @Nullable Location specLocation()
      Returns the value of the specLocation record component.
      Specified by:
      specLocation in interface IrisError
      Returns:
      the value of the specLocation record component
    • context

      public @Nullable String context()
      Returns the value of the context record component.
      Specified by:
      context in interface IrisError
      Returns:
      the value of the context record component