ErrorsCollection Interface (Microsoft.Office.Interop.InfoPath.SemiTrust)
Assembly: Microsoft.Office.Interop.InfoPath.SemiTrust (in microsoft.office.interop.infopath.semitrust.dll)
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, see Errors.
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 method.
//Add an error to the node IXMLDOMDocument myDOM = thisXDocument.DOM; IXMLDOMNode myNode = myDOM.selectSingleNode("my:myFields/my:aGroup/my:field1"); thisXDocument.Errors.Add(myNode,"condition","short","detail",102057,"modeless");