ErrorsCollection Interface

Definition

Contains an ErrorObject object for each error within a Microsoft InfoPath form.

public interface class ErrorsCollection : Microsoft::Office::Interop::InfoPath::SemiTrust::Errors
[System.Runtime.InteropServices.Guid("096cd578-0786-11d1-95fa-0080c78ee3bb")]
public interface ErrorsCollection : Microsoft.Office.Interop.InfoPath.SemiTrust.Errors
type ErrorsCollection = interface
    interface Errors
Public Interface ErrorsCollection
Implements Errors
Attributes
Implements

Examples

//Add an error to the node
IXMLDOMDocument myDOM = thisXDocument.DOM;
IXMLDOMNode myNode = myDOM.selectSingleNode("my:myFields/my:aGroup/my:field1");
thisXDocument.<span class="label">Errors</span>.Add(myNode,"condition","short","detail",102057,"modeless");
  <p>The <strong>Errors</strong> collection is accessed through the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust._XDocument2.Errors"></xref> property of the <xref data-throw-if-not-resolved="true" uid="Microsoft.Office.Interop.InfoPath.SemiTrust.XDocument"></xref> object.</p>
  <code>&lt;span class="label"&gt;ErrorsCollection&lt;/span&gt; err = thisXDocument.Errors;</code>

Remarks

This type is a wrapper for a coclass that is required by managed code for COM interoperability. Use this type to access the members of the COM interface implemented by this coclass. For information about the COM interface, including a link to descriptions of its members, seeErrors.

The Errors collection provides properties and methods for adding, deleting, and gaining access to the Error objects that it contains.

In addition to managing the errors generated by InfoPath, the Errors collection can also be used to create custom errors using the Add(Object, String, String, String, Int32, String) method.

Note: Custom errors can also be created using the ReportError(Object, String, Boolean, String, Int32, String) method of the DataDOMEventObject object.

Properties

Count

Gets a count of the number of ErrorObject objects contained in the collection.

(Inherited from Errors)
Item[Int32]

Gets a reference to the specified ErrorObject object from the collection.

(Inherited from Errors)

Methods

Add(Object, String, String, String, Int32, String)

Adds an ErrorObject to ErrorsCollection and returns a reference to the new Error object.

(Inherited from Errors)
Delete(Object, String)

Deletes the specified ErrorObject object from the ErrorsCollection collection.

(Inherited from Errors)
DeleteAll()

Deletes all of the ErrorObject objects contained in the ErrorsCollection collection.

(Inherited from Errors)
GetEnumerator()

Gets an IEnumerator that iterates over all entries in the ErrorsCollection object.

(Inherited from Errors)

Applies to