Error.ErrorType property
Gets the type of an ErrorObject object.
Namespace: Microsoft.Office.Interop.InfoPath
Assembly: Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)
Syntax
'Declaration
ReadOnly Property ErrorType As String
Get
'Usage
Dim instance As Error
Dim value As String
value = instance.ErrorType
string ErrorType { get; }
Property value
Type: System.String
Remarks
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 method of DataDOMEventObject object.
USER_SPECIFIED Data validation failed as a result of a custom scripting error using the Add method of the Errors collection.
Note
The ErrorType property can be used to determine the type of data validation error that has occurred.
Examples
In the following example, the ErrorType property of the ErrorObject object is used to display the type of an error in a message box:
Error objError = XDocument.Errors[0];
thisXDocument.UI.Alert("Error type: " + objError.ErrorType);