O'Reilly logo

Microsoft® Windows® Workflow Foundation Step by Step by Kenn Scribner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Throw Activity

I mentioned this very early in the book, but I haven’t really reinforced this basic concept—workflows model processes. Therefore, we need to be able to model a wide variety of real-world situations, including the case where we need to throw an exception. Suppose that something along the way wasn’t quite right, and the situation was not one our software could deal with in any other way than to throw an exception. We could, if we wanted, just throw an exception using the C# throw keyword, but using a special activity for this allows us to also use a special activity for handling exceptions, as we’ll see in the next section. If we use the C# throw keyword, the workflow runtime "swallows" the exception, with no notice given. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required