Aborting a run with SenseTalk

I’m sure you can do this, but I can’t find the commands.

I have situations that can possibly happen that make running more test cases pointless. Unexpected issues have come up and I can’t get the SUT to the state it needs to be – so there is no reason to run further tests.

I have a try catch block – if things fail, I run a couple functions to do some basic cleanup, and make sure my log is in good shape, then I want to abort.

Is there a command to do this abort from within the script?


You can throw an exception yourself using the throw command:

throw "Irrecoverable Errors"

Of course, if you have a higher-level try/catch block in place, the exception that you throw will be caught there. To simply terminate execution (as though the script had ended), you can use the exit command:

exit all