Debug Functions

Test the object's value. If it is false, the script execution will be stopped with an error message.

assert(object) : null

Test the object's value. If it is false, the script will display an error message but it will continue.

verify(object) : bool

Test the object's value. If it is true, the script will wait user interaction.

breakpoint(object) : null

Print the current stack trace.

printStackTrace() : null

Immediately end the script execution. The call is equivalent to return from main() function.

exit(object) : null

Dump a content of a passed object and its subobjects in pseudo XML format.

dump(object) : object

Examples

Check if the operation was successful or not. Verify() only displays an error message, assert() ends the script.

test = false;
verify(test);
assert(test);
println("This will be never executed.");
script.txt:4: Verify: Operation was not successful
script.txt:5: Assert: Operation was not successful
*** EXITING SCRIPT MAIN, OK ***
Exit value: false

Dump content of a variable.

a = array(3);
a[0] = "some string";
a[1] = 5;
dump(a);
<ValueReference>
    <ValueArray>
        <ValueReference>
            <ValueString value="some string" />
        </ValueReference>
        <ValueReference>
            <ValueInt value="5" />
        </ValueReference>
        <ValueReference>
            <ValueNull />
        </ValueReference>
    </ValueArray>
</ValueReference>