Difference between revisions of "Core.Actions.Throw"
Jump to navigation
Jump to search
(Created page with "Category:Core == Classification == {{ClassificationActivity | Throw | To explicitly raise of an exception | End Node | OTX Core library | End node related a...") |
|||
Line 2: | Line 2: | ||
== Classification == | == Classification == | ||
{{ClassificationActivity | Throw | To explicitly raise of an exception | [[End Node]] | [[Core|OTX Core library]] | [[End node related actions]] | - | [[CoreChk017|Core_Chk017]]<br/>[[CoreChk018|Core_Chk018]] }} | {{ClassificationActivity | Throw | To explicitly raise of an exception | [[End Node]] | [[Core|OTX Core library]] | [[End node related actions]] | - | [[CoreChk017|Core_Chk017]]<br/>[[CoreChk018|Core_Chk018]] }} | ||
+ | |||
+ | == OTL Syntax == | ||
+ | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | throw ExceptionTerm; | ||
+ | </syntaxhighlight> | ||
== Description == | == Description == | ||
Line 7: | Line 12: | ||
{{Important|Please note the special behavior within an [[Parallel]] activity.}} | {{Important|Please note the special behavior within an [[Parallel]] activity.}} | ||
+ | |||
+ | == OTL Examples == | ||
+ | <syntaxhighlight lang="java" enclose="div" style="font-size: medium;"> | ||
+ | UserException userException; | ||
+ | String stringVar1; | ||
+ | Boolean Condition1 = true; | ||
+ | |||
+ | if (Condition1) | ||
+ | { | ||
+ | throw userException; | ||
+ | } | ||
+ | else | ||
+ | { | ||
+ | } | ||
+ | |||
+ | stringVar1 = "I will never happen because of the Throw"; | ||
+ | </syntaxhighlight> | ||
== See also == | == See also == |
Revision as of 04:03, 3 February 2015
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.
![]() |
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";