Error.ErrorType Property
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.
Gets the type of an ErrorObject object.
public:
property System::String ^ ErrorType { System::String ^ get(); };
public string ErrorType { get; }
member this.ErrorType : string
Public ReadOnly Property ErrorType As String
Property Value
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.<span class="label">ErrorType</span>);
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(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.
Important: This member can be accessed only by forms running in the same domain as the currently open form, or by forms that have been granted cross-domain permissions.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for