Class RuleError
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- software.amazon.smithy.rulesengine.language.error.RuleError
-
- All Implemented Interfaces:
java.io.Serializable
public final class RuleError extends java.lang.RuntimeExceptionAn 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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceRuleError.Evaluator<T>
-
Constructor Summary
Constructors Constructor Description RuleError(SourceException root)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> Tcontext(java.lang.String message, java.lang.Runnable f)static voidcontext(java.lang.String message, FromSourceLocation sourceLocation, java.lang.Runnable f)static <T> Tcontext(java.lang.String message, FromSourceLocation sourceLocation, RuleError.Evaluator<T> f)static <T> Tcontext(java.lang.String message, RuleError.Evaluator<T> f)java.lang.StringtoString()RuleErrorwithContext(java.lang.String context, SourceLocation loc)
-
-
-
Constructor Detail
-
RuleError
public RuleError(SourceException root)
-
-
Method Detail
-
context
public static <T> T context(java.lang.String message, java.lang.Runnable f) throws RuleError- Throws:
RuleError
-
context
public static <T> T context(java.lang.String message, RuleError.Evaluator<T> f) throws RuleError- Throws:
RuleError
-
context
public static void context(java.lang.String message, FromSourceLocation sourceLocation, java.lang.Runnable f)
-
context
public static <T> T context(java.lang.String message, FromSourceLocation sourceLocation, RuleError.Evaluator<T> f) throws RuleError- Throws:
RuleError
-
withContext
public RuleError withContext(java.lang.String context, SourceLocation loc)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Throwable
-
-