Add a Catch Exception Block
The Catch Exception block represents an exception handler. Catch Exception blocks are attached to the end of a Scope shape in Orchestration Designer. You can attach as many Catch Exception blocks as you need.
You can set up exception handlers to handle different kinds of exceptions. On each exception handler, you specify an exception type, which must be either an exception or an object derived from the class System
. If an exception is thrown that matches the specified type in an exception handler, that exception handler will be called.
Note
To add a Catch Exception block to a Scope shape, the Transaction Type property of the Scope shape must be set to None or Long Running.
To add and populate a Catch Exception block
Right-click the Scope shape to which you want to add a Catch Exception block, and then click New Exception Handler.
A Catch Exception block is added to the orchestration immediately following the associated Scope shape.
In the Properties window, specify the properties.
The most important property is the Exception Object Type; this is the type of message it will catch.
Property Description Exception Object Name Assigns a name to the exception object caught by the exception handler. Exception Object Type Determines the object type (derived from System.Exception) that this exception handler will catch. In the Properties window, in the Exception Object Type list, select the General Exception.
Inside the Catch Exception block, add shapes to create the process for handling the exception.
Right-click below the Catch Exception block, point to Insert Shape, and then select Construct Message.
Double-click inside MessageAssignment to activate the Text Editor and enter the Message assignment.
For example, type
Message_3 = Test
.
See Also
Completing the Exception Message
How to Add a Scope Shape
Using BizTalk Server Exception Handling