- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- com.pervasive.datarush.exceptions.DRException
-
- com.pervasive.datarush.types.TypeNotSupportedException
-
- All Implemented Interfaces:
Serializable
public class TypeNotSupportedException extends DRException
Unchecked exception thrown to indicate a type is not valid in a given context.For record types, this is usually chained with a
FieldTypeNotSupportedException
indicating the field which caused this error.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TypeNotSupportedException(RecordTokenType type, String reason, FieldTypeNotSupportedException cause)
Constructs aTypeNotSupportException
indicating the specified record type and field causing the failure.TypeNotSupportedException(TokenType type, String reason)
Constructs aTypeNotSupportException
indicating the specified type and providing additional context information about the failure.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getMessage()
TokenType
getType()
Gets the type which violated the constraint.-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
TypeNotSupportedException
public TypeNotSupportedException(TokenType type, String reason)
Constructs aTypeNotSupportException
indicating the specified type and providing additional context information about the failure.- Parameters:
type
- the type of the object in violationreason
- additional contextual information about the violated constraint
-
TypeNotSupportedException
public TypeNotSupportedException(RecordTokenType type, String reason, FieldTypeNotSupportedException cause)
Constructs aTypeNotSupportException
indicating the specified record type and field causing the failure.- Parameters:
type
- the record type of the object in violationreason
- additional contextual information about the violated constraintcause
- the field error triggering this exception
-
-
Method Detail
-
getMessage
public String getMessage()
- Overrides:
getMessage
in classThrowable
-
getType
public TokenType getType()
Gets the type which violated the constraint.- Returns:
- the type which raised the error
-
-