public class InvalidOperandTypeException extends DRException
These errors are typically raised at one of two times:
Constructor and Description |
---|
InvalidOperandTypeException(String reason)
Declares an exception occurred for the specified reason.
|
InvalidOperandTypeException(String reason,
ScalarTokenType required)
Declares an exception occurred for the specified reason.
|
InvalidOperandTypeException(String reason,
ScalarTokenType required,
ScalarValuedFunction operand,
ScalarTokenType operandType)
Declares an exception occurred for the specified reason, caused
by the given subexpression yielding a result of the given type.
|
InvalidOperandTypeException(String reason,
ScalarValuedFunction operand,
ScalarTokenType operandType)
Declares an exception occurred for the specified reason, caused
by the given subexpression yielding a result of the given type.
|
Modifier and Type | Method and Description |
---|---|
void |
addOperand(ScalarValuedFunction operand,
ScalarTokenType operandType)
Adds an additional subexpression and its type to the error.
|
String |
getMessage() |
ScalarTokenType |
getRequiredType()
Gets the type requirement which failed to be satisfied.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public InvalidOperandTypeException(String reason)
reason
- an explanation of the cause of the errorpublic InvalidOperandTypeException(String reason, ScalarTokenType required)
reason
- an explanation of the cause of the errorrequired
- the type requirement which could not be metpublic InvalidOperandTypeException(String reason, ScalarValuedFunction operand, ScalarTokenType operandType)
reason
- an explanation of the cause of the erroroperand
- the offending subexpressionoperandType
- the result type of the offending subexpressionpublic InvalidOperandTypeException(String reason, ScalarTokenType required, ScalarValuedFunction operand, ScalarTokenType operandType)
reason
- an explanation of the cause of the errorrequired
- the type requirement which could not be metoperand
- the offending subexpressionoperandType
- the result type of the offending subexpressionpublic void addOperand(ScalarValuedFunction operand, ScalarTokenType operandType)
In some cases, the type requirement may involve multiple subexpressions; for instance, if all arguments must be comparable. Use this method to this additional information to the exception.
operand
- the offending subexpressionoperandType
- the result type of the offending subexpressionpublic String getMessage()
getMessage
in class Throwable
public ScalarTokenType getRequiredType()
In some cases, this may return TokenTypeConstant.SCALAR
,
indicating the requirement is more complex than can be expressed
by a single type value.
Copyright © 2020 Actian Corporation. All rights reserved.