Overview
Throws an error if the current transaction is cancelled.
void myScript.ThrowIfCancelled()
...
Example
Code Block | ||
---|---|---|
| ||
function longRunningMethod() { var isCompleted = false; while(!isCompleted) { isCompleted = SomethingRunningLongTime(); // break if cancelled Script.ThrowIfCancelled(); } } |