Class RuleError
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
software.amazon.smithy.rulesengine.language.error.RuleError
- All Implemented Interfaces:
Serializable
An exception that can be thrown when rule-set is invalid. Used for providing meaningful contextual
information when an invalid rule-set is encountered.
- See Also:
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> T
static void
context
(String message, FromSourceLocation sourceLocation, Runnable f) static <T> T
context
(String message, FromSourceLocation sourceLocation, RuleError.Evaluator<T> f) static <T> T
context
(String message, RuleError.Evaluator<T> f) toString()
withContext
(String context, SourceLocation loc) Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
Constructor Details
-
RuleError
-
-
Method Details
-
context
- Throws:
RuleError
-
context
- Throws:
RuleError
-
context
-
context
public static <T> T context(String message, FromSourceLocation sourceLocation, RuleError.Evaluator<T> f) throws RuleError - Throws:
RuleError
-
withContext
-
toString
-