public class CsdlException extends DataSchemaException
Exception thrown when an error occurs during the parsing of an Open Data Protocol (OData) service metadata (CSDL) document.
| Modifier | Constructor and Description |
|---|---|
|
CsdlException()
Default constructor.
|
protected |
CsdlException(java.lang.String message,
java.lang.Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
static CsdlException |
cannotFetch(java.lang.String url)
Return a CSDL exception which indicates the metadata document at a particular
url cannot be fetched. |
XmlElement |
getElement()
Return (nullable) CSDL XML element related to this exception.
|
void |
setElement(XmlElement value)
Set CSDL XML element related to this exception.
|
static CsdlException |
unknownSchema(java.lang.String ns)
Return a CSDL exception which indicates the metadata document at a particular
url references an unknown schema. |
static CsdlException |
withCause(java.lang.RuntimeException cause)
Return a new exception with the specified root cause.
|
static CsdlException |
withCauseAndMessage(java.lang.RuntimeException cause,
java.lang.String message)
Return a new exception with the specified root cause and message text.
|
static CsdlException |
withElement(XmlElement element,
java.lang.String message)
Return a CSDL exception which indicates a problem related to a particular CSDL XML element.
|
static CsdlException |
withMessage(java.lang.String message)
Return a new exception with the specified message text.
|
getSafeMessage, safe, setSafeMessagegetCause, getMessage, setCause, setMessage, toStringprotected CsdlException(java.lang.String message,
java.lang.Throwable cause)
public CsdlException()
Default constructor.
public static CsdlException cannotFetch(java.lang.String url)
Return a CSDL exception which indicates the metadata document at a particular url cannot be fetched.
url - Metadata URL.url cannot be fetched.public XmlElement getElement()
Return (nullable) CSDL XML element related to this exception.
public void setElement(XmlElement value)
Set CSDL XML element related to this exception.
value - CSDL XML element related to this exception.public static CsdlException unknownSchema(java.lang.String ns)
Return a CSDL exception which indicates the metadata document at a particular url references an unknown schema.
ns - Schema namespace.url references an unknown schema.public static CsdlException withCause(java.lang.RuntimeException cause)
Return a new exception with the specified root cause.
cause - (nullable) Root cause.public static CsdlException withCauseAndMessage(java.lang.RuntimeException cause, java.lang.String message)
Return a new exception with the specified root cause and message text.
cause - (nullable) Root cause.message - (nullable) Message text.public static CsdlException withElement(XmlElement element, java.lang.String message)
Return a CSDL exception which indicates a problem related to a particular CSDL XML element.
element - XML element.message - Message text.public static CsdlException withMessage(java.lang.String message)
Return a new exception with the specified message text.
message - (nullable) Message text.