Error.ConditionName Property

Definition

Gets the name of the ErrorObject object.

public:
 property System::Object ^ ConditionName { System::Object ^ get(); };
public object ConditionName { get; }
member this.ConditionName : obj
Public ReadOnly Property ConditionName As Object

Property Value

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.<span class="label">ConditionName</span>);

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).

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