Share via


Error.ConditionName property

Gets the name of the ErrorObject object.

Namespace:  Microsoft.Office.Interop.InfoPath
Assembly:  Microsoft.Office.Interop.InfoPath (in Microsoft.Office.Interop.InfoPath.dll)

Syntax

'Declaration
ReadOnly Property ConditionName As Object
    Get
'Usage
Dim instance As Error
Dim value As Object

value = instance.ConditionName
Object ConditionName { get; }

Property value

Type: System.Object

Remarks

The ConditionName property is used only for custom errors; it is not used for schema validation–generated or system-generated errors. If the type of error is schema validation generated or system generated, the ConditionName property will return a null reference (Nothing in Visual Basic).

Examples

In the following example, the ConditionName property of an instance of the ErrorObject object is used to display the name of a custom error in a message box:

Error firstError = thisXDocument.Errors[0];
thisXDocument.UI.Alert("Error condition name: " + firstError.ConditionName);

See also

Reference

Error interface

Error members

Microsoft.Office.Interop.InfoPath namespace