ErrorObject Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an error in a Microsoft InfoPath form.
public interface class ErrorObject : Microsoft::Office::Interop::InfoPath::Error
[System.Runtime.InteropServices.Guid("096CD577-0786-11D1-95FA-0080C78EE3BB")]
public interface ErrorObject : Microsoft.Office.Interop.InfoPath.Error
type ErrorObject = interface
interface Error
Public Interface ErrorObject
Implements Error
- Derived
- Attributes
- Implements
Examples
In the following example, the Error object is accessed using indexing in the Errors collection.
<span class="label">Error</span> er = thisXDocument.Errors[0];
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, seeError.
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.
- SYSTEM_GENERATED Data validation failed as a result of constraints defined in the form definition (.xsf) file or as a result of form code calling the ReportError(Object, String, Boolean, String, Int32, String) method of DataDOMEventObject object.
- USER_SPECIFIED Data validation failed as a result of a custom scripting error using the Add(Object, String, String, String, Int32, String) method of the Errors collection.
Note: The ErrorType property can be used to determine the type of data validation error that has occurred.
Properties
ConditionName |
Gets the name of the ErrorObject object. (Inherited from Error) |
DetailedErrorMessage |
Gets or sets the detailed error message of an ErrorObject object. (Inherited from Error) |
ErrorCode |
Gets or sets the error code of an ErrorObject object. (Inherited from Error) |
ErrorType |
Gets the type of an ErrorObject object. (Inherited from Error) |
Node |
Gets the XML Document Object Model (DOM) node of a form's underlying XML document that is associated with an ErrorObject object. (Inherited from Error) |
ShortErrorMessage |
Gets or sets the short error message of an ErrorObject object. (Inherited from Error) |