$throw

Throws the specified exception with the given message.
Syntax
    $throw{exception_name}{exception_message}
DocumentationThrows the specified exception with the given message.
Examples
    $try
    {
    $if{$not{$login{$getCurrent{xuser}}{$getCurrent{xpassword}}}}
    {$throw{SecurityException}{Access denied.}}
    ..... (additional checks) ....
    ... normal code ...
    }
    {SecurityException}
    {
    ... error routine ....
    <h1> Error occurs </h1>
    }

    Result:
    this will throw an exception of type my.application.SecurityException if the user named by the current variable xuser does not exist or the password named by the current variable xpassword is wrong
GroupControl_Flow
Minimum required transaction-mode:NONE
Required scripting permission of the developerPERMISSION_FL_BASIC
Minimum parameters0
Maximum parameters 2