Skip to content

Interface IrisError

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.

All Superinterfaces:
Serializable
All Known Implementing Classes:
IrisError.CheckError, IrisError.ReadError, IrisError.SpecError
public sealed interface IrisError extends Serializable permits IrisError.SpecError, IrisError.ReadError, IrisError.CheckError
The details of an error, in the terms of the Specification's canonical error document.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    A check that failed.
    static final record 
    An error found while reading an input.
    static final record 
    An error found while parsing a reader spec.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the stable code of the error.
    @Nullable String
    Returns the execution context, outermost first, or null if the error has none.
    @Nullable Location
    Returns the location in the input, or null if the error has none.
    Returns the main diagnostic text, without a location.
    @Nullable List<Integer>
    Returns the indices of a failed check's witness, or null for any other error.
    @Nullable Location
    Returns the location in the reader spec, or null if the error has none.
    default String
    Returns the canonical error document of this error (§3.7), with its final newline.
  • Method Details

    • code

      ErrorCode code()
      Returns the stable code of the error.
      Returns:
      the stable code of the error
    • message

      String message()
      Returns the main diagnostic text, without a location.
      Returns:
      the main diagnostic text, without a location
    • inputLocation

      @Nullable Location inputLocation()
      Returns the location in the input, or null if the error has none.
      Returns:
      the location in the input, or null if the error has none
    • specLocation

      @Nullable Location specLocation()
      Returns the location in the reader spec, or null if the error has none.
      Returns:
      the location in the reader spec, or null if the error has none
    • context

      @Nullable String context()
      Returns the execution context, outermost first, or null if the error has none.
      Returns:
      the execution context, outermost first, or null if the error has none
    • recordPath

      @Nullable List<Integer> recordPath()
      Returns the indices of a failed check's witness, or null for any other error.
      Returns:
      the indices of a failed check's witness, or null for any other error
    • toJson

      default String toJson()
      Returns the canonical error document of this error (§3.7), with its final newline.
      Returns:
      the canonical error document of this error (§3.7), with its final newline