Package org.apache.jena.datatypes
Class DatatypeFormatException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
org.apache.jena.shared.JenaException
org.apache.jena.datatypes.DatatypeFormatException
- All Implemented Interfaces:
Serializable
Exception thrown when a lexical form does not match the stated
datatype.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance ofDatatypeFormatException
without detail message.DatatypeFormatException
(String message) Constructs a new @code DatatypeFormatException} with the specified detail message.DatatypeFormatException
(String message, Throwable cause) Constructs a newDatatypeFormatException
with the specified detail message and cause.DatatypeFormatException
(String lexicalForm, RDFDatatype dtype, String message) Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and detail message.DatatypeFormatException
(String lexicalForm, RDFDatatype dtype, Throwable cause) Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and cause. -
Method Summary
Modifier and TypeMethodDescriptionThe datatype that has an invalid lexical form.The invalid lexical form that caused this exception.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
DatatypeFormatException
Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and cause. The detail message (for later retrieval by theThrowable.getMessage()
method) is generated using the given datatype and illegal lexical form.- Parameters:
lexicalForm
- the illegal lexical form discovered. The illegal lexical form is saved for later retrieval by thegetLexicalForm()
method.dtype
- the datatype that found the problem. The datatype is saved for later retrieval by thegetDataType()
method.cause
- the cause (which is saved for later retrieval by theThrowable.getCause()
method). (Anull
value is permitted, and indicates that the cause is nonexistent or unknown.)
-
DatatypeFormatException
Constructs a newDatatypeFormatException
with the specified illegal lexical form, datatype and detail message.- Parameters:
lexicalForm
- the illegal lexical form discovered. The illegal lexical form is saved for later retrieval by thegetLexicalForm()
method.dtype
- the datatype that found the problem. The datatype is saved for later retrieval by thegetDataType()
method.message
- the detail message (which is saved for later retrieval by theThrowable.getMessage()
method).
-
DatatypeFormatException
public DatatypeFormatException()Creates a new instance ofDatatypeFormatException
without detail message. -
DatatypeFormatException
Constructs a newDatatypeFormatException
with the specified detail message and cause.- Parameters:
message
- the detail message (which is saved for later retrieval by theThrowable.getMessage()
method).cause
- the cause (which is saved for later retrieval by theThrowable.getCause()
method). (Anull
value is permitted, and indicates that the cause is nonexistent or unknown.)
-
DatatypeFormatException
Constructs a new @code DatatypeFormatException} with the specified detail message. The cause is not initialized, and may subsequently be initialized by a call toThrowable.initCause(java.lang.Throwable)
.- Parameters:
message
- the detail message. The detail message is saved for later retrieval by theThrowable.getMessage()
method.
-
-
Method Details
-
getLexicalForm
The invalid lexical form that caused this exception.- Returns:
- the lexical form that caused the exception. Maybe null depending on how the exception was constructed.
-
getDataType
The datatype that has an invalid lexical form.- Returns:
- the datatype that this exception is related to. Maybe null depending on how the exception was constructed.
-