Error Handling

โŒ˜K
  1. Home
  2. Docs
  3. Error Handling
  4. Throw

Throw

System.Activities.Statements.Throw

  • Throw activity is used to simulate an Exception like in an If condition or something which will end the process or enter the Catch.
  • In the Catch activity, the type of execution to catch and then to get the message use Message or exception.ToString.

Properties

ย  ย  ย  ย Misc

  • DisplayName (String) โ€“ To set a meaningful name according to the user.
  • Exception (InArgument<Exception>) –To throw an exception, following is the syntax

ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย newException(โ€œThrowing an exception because something went wrongโ€)

ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย OR

ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย newBusinessRuleException(โ€œThrowing an exception because this transaction needs toย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  ย  be referred back to the businessโ€)