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 ClassesModifier and TypeInterfaceDescriptionstatic final recordA check that failed.static final recordAn error found while reading an input.static final recordAn error found while parsing a reader spec. -
Method Summary
Modifier and TypeMethodDescriptioncode()Returns the stable code of the error.@Nullable Stringcontext()Returns the execution context, outermost first, or null if the error has none.@Nullable LocationReturns the location in the input, or null if the error has none.message()Returns the main diagnostic text, without a location.Returns the indices of a failed check's witness, or null for any other error.@Nullable LocationReturns the location in the reader spec, or null if the error has none.default StringtoJson()Returns the canonical error document of this error (§3.7), with its final newline.
-
Method Details
-
code
-
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
-
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
-