Exception Element (ProxyGen)

Represents a proxy exception for a managed exception.

<Exception isExcluded = "true/false"
    newName = "New name of proxy exception"
    newNamespace = "New namespace of proxy exception"
    originalFullyQualifiedName = "Fully qualified name of original exception"/>
  <Attribute>...</Attribute>
  <BaseType>...</BaseType>
  <Delegate>...</Delegate>
  <Enum>...</Enum>
  <Field>...</Field>
  <ImplementedInterface>...</ImplementedInterface>
</Exception>

Exception_Type

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

isExcluded

Optional xs:boolean attribute.

true to omit the exception from the proxy code; false to include the exception in the proxy code. The default is false.

newName

Optional identifier_Type attribute.

The new name of the exception in the proxy code.

newNamespace

Optional name_Type attribute.

The new namespace of the exception in the proxy code.

originalFullyQualifiedName

Required xs:ID attribute.

The fully qualified name of the original exception in the host application's object model.

Child Elements

Element

Description

Attribute

Optional Attribute_Type element.

Represents an attribute that is applied to the exception.

BaseType

Optional TypeReference_Type element.

Describes the base type of the exception.

Delegate

Optional Delegate_Type element.

Represents a delegate that is defined in the exception.

Enum

Optional Enum_Type element.

Represents an enumeration that is defined in the exception.

Field

Optional ManagedField_Type element.

Represents a field in the exception.

ImplementedInterface

Optional TypeReference_Type element.

Represents an interface that the exception implements.

Parent Elements

Element

Description

Class

Represents a proxy class for a managed class.

Interface

Represents a proxy interface for a managed interface.

ManagedLibrary

Represents the contents of a managed assembly.

Struct

Represents a proxy struct for a managed struct.

Example

The following example demonstrates an Exception element that represents a proxy exception named LocationInvalidException.

<Exception originalFullyQualifiedName="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.LocationInvalidException" isExcluded="false">
  <BaseType>
    <ExternalTypeReference isInterface="false" type="System.Exception" />
  </BaseType>
  <Field originalName="invalidLocation" isExcluded="false">
    <Type>
      <TypeReference type="Microsoft.VisualStudio.Tools.Applications.Samples.ShapeApp.Point" />
    </Type>
  </Field>
</Exception>

Element Information

Namespace

https://schemas.microsoft.com/vsta/2008/01/ProxyGenDescriptor

Schema name

ProxyGen Descriptor

Validation file

ProxyGenDescriptorv2.xsd

Can be empty

Yes

See Also

Concepts

ProxyGen Descriptor Schema Reference

Creating Proxies

Defining Entry Points and Other Proxy Changes