CSDLError

open class CSDLError : DataSchemaError

Exception thrown when an error occurs during the parsing of an Open Data Protocol (OData) service metadata (CSDL) document.

See also

CsdlParser.
  • CSDL XML element related to this exception.

    Declaration

    Swift

    final public var element: XmlElement?
  • Default initializer.

    Declaration

    Swift

    override public init()
  • Declaration

    Swift

    open class func cannotFetch(url: String) -> CSDLError

    Parameters

    url

    Metadata URL.

    Return Value

    a CSDL exception which indicates the metadata document at a particular url cannot be fetched.

  • Declaration

    Swift

    open class func unknownSchema(ns: String) -> CSDLError

    Parameters

    ns

    Schema namespace.

    Return Value

    a CSDL exception which indicates the metadata document at a particular url references an unknown schema.

  • Declaration

    Swift

    open class func withCause(_ cause: Error?) -> CSDLError

    Parameters

    cause

    Root cause.

    Return Value

    A new exception with the specified root cause.

  • Declaration

    Swift

    open class func withCauseAndMessage(cause: Error?, message: String?) -> CSDLError

    Parameters

    cause

    Root cause.

    message

    Message text.

    Return Value

    A new exception with the specified root cause and message text.

  • Declaration

    Swift

    open class func withElement(_ element: XmlElement, message: String) -> CSDLError

    Parameters

    element

    XML element.

    message

    Message text.

    Return Value

    a CSDL exception which indicates a problem related to a particular CSDL XML element.

  • Declaration

    Swift

    open class func withMessage(_ message: String?) -> CSDLError

    Parameters

    message

    Message text.

    Return Value

    A new exception with the specified message text.