Class BuildException
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.Throwable
java.lang.Exception
java.lang.RuntimeException
dev.gecode.iris.build.BuildException
- All Implemented Interfaces:
Serializable
Thrown when a reader spec cannot be built: a builder check failed, or the language rejected the
emitted text.
kind names the check. A check that one statement can fail throws at that statement's
call; the checks of the whole spec throw from Builder.source() and Builder.build().
Either way callSite names the line of the caller's code that made the statement, and
getMessage() ends with it.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescription@Nullable StackTraceElementcallSite()Returns the line of the caller's code that made the failing statement, or null if no caller is known.@Nullable StringReturns the line of emitted text that the language error points at, or null.@Nullable IrisExceptionfailure()Returns the language error, when the language rejected the emitted text, or null.Returns the message: the error code for aBuildException.Kind.SPECfailure, the reason, the emitted line if there is one, and the call site.kind()Returns the check that failed.reason()Returns the reason, without the error code, the emitted line and the call site thatgetMessage()adds.@Nullable Stringtext()Returns the emitted text, when the language rejected it, and otherwise null.Methods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Method Details
-
getMessage
Returns the message: the error code for aBuildException.Kind.SPECfailure, the reason, the emitted line if there is one, and the call site.- Overrides:
getMessagein classThrowable- Returns:
- the message: the error code for a
BuildException.Kind.SPECfailure, the reason, the emitted line if there is one, and the call site
-
kind
-
reason
Returns the reason, without the error code, the emitted line and the call site thatgetMessage()adds.- Returns:
- the reason, without the error code, the emitted line and the call site that
getMessage()adds
-
callSite
Returns the line of the caller's code that made the failing statement, or null if no caller is known.- Returns:
- the line of the caller's code that made the failing statement, or null if no caller is known
-
text
Returns the emitted text, when the language rejected it, and otherwise null.- Returns:
- the emitted text, when the language rejected it, and otherwise null
-
failure
Returns the language error, when the language rejected the emitted text, or null.- Returns:
- the language error, when the language rejected the emitted text, or null
-
emittedLine
Returns the line of emitted text that the language error points at, or null.- Returns:
- the line of emitted text that the language error points at, or null
-