Throw Activity Designer
Applies to: Visual Studio Visual Studio for Mac
Note
This article applies to Visual Studio 2017. If you're looking for the latest Visual Studio documentation, see Visual Studio documentation. We recommend upgrading to the latest version of Visual Studio. Download it here
The Throw activity designer is used to create and configure a Throw activity.
The Throw Activity
The Throw activity throws an exception.
Using the Throw Activity Designer
Access the Throw activity designer in the Error Handling category of the Toolbox.
The Throw activity designer can be dragged from the Toolbox and dropped on to the Workflow Designer surface wherever activities are usually placed, such as inside a Sequence. This creates a Throw activity with a default DisplayName of Throw. The DisplayName value can be edited in the header of the Throw activity designer or in the DisplayName box of the property grid. The Exception property must be edited on the property grid.
The Throw Properties
The following table shows the Throw properties and describes how they are used in the designer.
Property Name | Required | Usage |
---|---|---|
DisplayName | False | Specifies the optional friendly name of the Throw activity. The default is Throw. |
Exception | True | The exception to throw. This exception must derive from Exception. To specify the exception, type a Visual Basic expression in the property grid. |