|Important||This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.|
ErrorObject Interface (Microsoft.Office.Interop.InfoPath)
Assembly: Microsoft.Office.Interop.InfoPath (in microsoft.office.interop.infopath.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 Error.
Each Error object in InfoPath is each associated with an XML Document Object Model (DOM) node from a form's underlying XML document. When data validation fails for a particular XML DOM node, InfoPath creates an Error object and places it in the ErrorsCollection collection.
There are three types of data validation errors that can occur in an InfoPath form:
SCHEMA_VALIDATION Data validation failed as a result of an XML Schema–defined constraint.
USER_SPECIFIED Data validation failed as a result of a custom scripting error using the Add method of the Errors collection.
The ErrorType property can be used to determine the type of data validation error that has occurred.