public class TypesNotComparableException extends DRException
Exception chaining is used in two ways to provide additional details about the cause of a comparison error.
FieldTypesNotComparableException
as the cause indicating which
fields raised the error.TypesNotComparableException
. The wrapping exception
contains more contextual information about the comparison performed.Constructor and Description |
---|
TypesNotComparableException(RecordTokenType leftType,
RecordTokenType rightType,
FieldTypesNotComparableException cause)
Constructs a
TypesNotComparableException indicating the
specified record types are not comparable due to underlying fields
not being comparable. |
TypesNotComparableException(String context,
TypesNotComparableException cause)
Constructs a
TypesNotComparableException providing additional
context |
TypesNotComparableException(TokenType leftType,
TokenType rightType)
Constructs a
TypesNotComparableException indicating the
specified types were compared. |
TypesNotComparableException(TokenType leftType,
TokenType rightType,
String reason)
Constructs a
TypesNotComparableException indicating the
specified types were compared, providing additional information
about the failure. |
Modifier and Type | Method and Description |
---|---|
TokenType |
getLeftType()
Gets the type of the object on the left side of the
comparison which raised this exception.
|
String |
getMessage() |
TokenType |
getRightType()
Gets the type of the object on the right side of the
comparison which raised this exception.
|
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
public TypesNotComparableException(TokenType leftType, TokenType rightType)
TypesNotComparableException
indicating the
specified types were compared.leftType
- the type of the object on the left side of the
comparisonrightType
- the type of the object on the right side of the
comparisonpublic TypesNotComparableException(TokenType leftType, TokenType rightType, String reason)
TypesNotComparableException
indicating the
specified types were compared, providing additional information
about the failure.leftType
- the type of the object on the left side of the
comparisonrightType
- the type of the object on the right side of the
comparisonreason
- an additional explanation of why the types
are not comparablepublic TypesNotComparableException(RecordTokenType leftType, RecordTokenType rightType, FieldTypesNotComparableException cause)
TypesNotComparableException
indicating the
specified record types are not comparable due to underlying fields
not being comparable.leftType
- the record type of the object on the left side of the
comparisonrightType
- the record type of the object on the right side of the
comparisoncause
- the underlying field exceptionpublic TypesNotComparableException(String context, TypesNotComparableException cause)
TypesNotComparableException
providing additional
contextcontext
- a message providing additional context for the exceptioncause
- the wrapped exceptionpublic String getMessage()
getMessage
in class Throwable
public TokenType getLeftType()
public TokenType getRightType()
Copyright © 2016 Actian Corporation. All rights reserved.