XmlSchemaReferenceException Class

 

Represents errors reported by the XmlSchemaSetBuilder when a call to XmlSchemaSetBuilder.Compile reports errors.

Namespace:   Microsoft.VisualStudio.XmlEditor
Assembly:  Microsoft.VisualStudio.XmlEditor (in Microsoft.VisualStudio.XmlEditor.dll)

Inheritance Hierarchy

System.Object
  System.Exception
    Microsoft.VisualStudio.XmlEditor.XmlSchemaReferenceException

Syntax

[SerializableAttribute]
public class XmlSchemaReferenceException : Exception
[SerializableAttribute]
public ref class XmlSchemaReferenceException : Exception
[<SerializableAttribute>]
type XmlSchemaReferenceException = 
    class
        inherit Exception
    end
<SerializableAttribute>
Public Class XmlSchemaReferenceException
    Inherits Exception

Constructors

Name Description
System_CAPS_pubmethod XmlSchemaReferenceException(String, Exception, XmlSchemaReference)

Initializes a new instance of the XmlSchemaReferenceException class.

Properties

Name Description
System_CAPS_pubproperty Data

(Inherited from Exception.)

System_CAPS_pubproperty HelpLink

(Inherited from Exception.)

System_CAPS_pubproperty HResult

(Inherited from Exception.)

System_CAPS_pubproperty InnerException

(Inherited from Exception.)

System_CAPS_pubproperty Message

(Inherited from Exception.)

System_CAPS_pubproperty Reference

Returns the XmlSchemaReference from the XmlSchemaSetBuilder.Sources collection that triggered this exception.

System_CAPS_pubproperty Source

(Inherited from Exception.)

System_CAPS_pubproperty StackTrace

(Inherited from Exception.)

System_CAPS_pubproperty TargetSite

(Inherited from Exception.)

Methods

Name Description
System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetBaseException()

(Inherited from Exception.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetObjectData(SerializationInfo, StreamingContext)

(Inherited from Exception.)

System_CAPS_pubmethod GetType()

(Inherited from Exception.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod ToString()

(Inherited from Exception.)

Events

Name Description
System_CAPS_protevent SerializeObjectState

(Inherited from Exception.)

Remarks

When a call to XmlSchemaSetBuilder.Compile reports a resolution error, it is useful for applications to understand exactly which XmlSchemaSetBuilder.Sources collection caused the error. An XmlSchemaReferenceException is reported for each XmlSchemaReference in the Sources collection that directly or indirectly references a schema that resulted in resolution errors.

As an example, consider a schema attempting to include xsdtest1.xsd, which in turn includes xsdtest2.xsd. Suppose that xsdtest2.xsd includes xsdtest3.xsd and xsdtest3.xsd includes unknownlocation.xsd. A T:System.IO.FileNotFound exception will be reported, because unknownlocation.xsd was not found. The raised XmlSchemaReferenceException will point to the original XmlSchemaReference for xsdtest1.xsd, to inform the user that this reference resulted in down-stream errors.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.VisualStudio.XmlEditor Namespace

Return to top