Throw Statement (FPScript)
Throws an exception and returns the specified expression as the value of the exception.
Syntax
Throw [Value]
The syntax of the Throw statement consists of the following elements:
Element |
Description |
---|---|
Value |
An optional expression to be used as the value of the exception. If you leave out the expression, the exception has the data type Empty. |
Remarks
The exception can be caught and processed using a Try statement. If the exception is not caught, an error message is generated containing the value of the exception.
Available in
FlexPro View, Basic, Professional, Developer Suite
Example
Carries out a division calculation and throws an exception if the divisor equals zero.
Arguments X, Y
If Y == 0 Then
Throw "Division by zero detected!"
End
X / Y
See Also
You might be interested in these articles
You are currently viewing a placeholder content from Facebook. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou need to load content from reCAPTCHA to submit the form. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from Instagram. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More InformationYou are currently viewing a placeholder content from X. To access the actual content, click the button below. Please note that doing so will share data with third-party providers.
More Information