Class InferenceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.opendaylight.yangtools.yang.parser.spi.source.SourceException
-
- org.opendaylight.yangtools.yang.parser.spi.meta.InferenceException
-
- All Implemented Interfaces:
Serializable
public class InferenceException extends SourceException
Thrown when there is an inference error.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description InferenceException(@NonNull String message, @NonNull CommonStmtCtx stmt)
InferenceException(@NonNull String message, @NonNull CommonStmtCtx stmt, Throwable cause)
InferenceException(@NonNull String message, @NonNull StatementSourceReference source)
InferenceException(@NonNull String message, @NonNull StatementSourceReference source, Throwable cause)
InferenceException(@NonNull CommonStmtCtx stmt, @NonNull String format, Object... args)
InferenceException(@NonNull StatementSourceReference source, @NonNull String format, Object... args)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
throwIf(boolean expression, @NonNull CommonStmtCtx stmt, @NonNull String format, Object... args)
Throw an instance of this exception if an expression evaluates to true.static void
throwIf(boolean expression, @NonNull StatementSourceReference source, @NonNull String format, Object... args)
Throw an instance of this exception if an expression evaluates to true.-
Methods inherited from class org.opendaylight.yangtools.yang.parser.spi.source.SourceException
getSourceReference, throwIfNull, throwIfNull, unwrap, unwrap
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
InferenceException
public InferenceException(@NonNull String message, @NonNull StatementSourceReference source)
-
InferenceException
public InferenceException(@NonNull String message, @NonNull StatementSourceReference source, Throwable cause)
-
InferenceException
public InferenceException(@NonNull StatementSourceReference source, @NonNull String format, Object... args)
-
InferenceException
public InferenceException(@NonNull String message, @NonNull CommonStmtCtx stmt)
-
InferenceException
public InferenceException(@NonNull String message, @NonNull CommonStmtCtx stmt, Throwable cause)
-
InferenceException
public InferenceException(@NonNull CommonStmtCtx stmt, @NonNull String format, Object... args)
-
-
Method Detail
-
throwIf
public static void throwIf(boolean expression, @NonNull StatementSourceReference source, @NonNull String format, Object... args)
Throw an instance of this exception if an expression evaluates to true. If the expression evaluates to false, this method does nothing.- Parameters:
expression
- Expression to be evaluatedsource
- Statement source referenceformat
- Format string, according toString.format(String, Object...)
.args
- Format string arguments, according toString.format(String, Object...)
- Throws:
InferenceException
- if the expression evaluates to true.
-
throwIf
public static void throwIf(boolean expression, @NonNull CommonStmtCtx stmt, @NonNull String format, Object... args)
Throw an instance of this exception if an expression evaluates to true. If the expression evaluates to false, this method does nothing.- Parameters:
expression
- Expression to be evaluatedstmt
- Statement contextformat
- Format string, according toString.format(String, Object...)
.args
- Format string arguments, according toString.format(String, Object...)
- Throws:
InferenceException
- if the expression evaluates to true.
-
-