Core.Actions.Throw

From emotive
Jump to navigation Jump to search

Classification

Name Throw
Short Description To explicitly raise of an exception
Class End Node
Extension OTX Core library
Group End node related actions
Exceptions -
Checker Rules Core_Chk017
Core_Chk018
Standard Compliant Yes

OTL Syntax

throw ExceptionTerm;

Description

With the OTX throw activity Exceptions can be triggered explicitly, by the author. Typically, exceptions are, implicitly thrown by the runtime environment. For example, faulty calculations, the loss of communication or the occurrence of a negative response. Using the throw activity the user can cause your own exceptions however in error conditions. The Handler activity can to respond to exceptions.

Exclamation.png Important: Please note the special behavior within an Parallel activity.

OTL Examples

UserException userException;
String stringVar1;
Boolean Condition1 = true;

if (Condition1)
{
   throw userException;
}
else
{
}

stringVar1 = "I will never happen because of the Throw";

See also

Return
Continue
Break
TerminateLanes