Export (0) Print
Expand All

TerminateActivity.Error Property

Gets or sets an error message to report to administrators, providing the reason for termination.

Namespace:  System.Workflow.ComponentModel
Assembly:  System.Workflow.ComponentModel (in System.Workflow.ComponentModel.dll)

[BrowsableAttribute(true)]
public string Error { get; set; }

Property Value

Type: System.String
An error message that provides the reason for the workflow instance termination. The default value is null.

If this property is set when the activity is in runtime mode (the DesignMode property is set to false) a ReadOnlyException is thrown.

Propagation of this error message is determined by the host (the instance manager or the persistence provider).

The following example demonstrates setting the Error property. This example is from the Suspend and Terminate SDK sample. For more information, see Suspend and Terminate Sample.

this.terminate.Error = null;

.NET Framework

Supported in: 4.5, 4, 3.5, 3.0

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft