Overview
Throws an error if the current transaction is cancelled.
void myScript.ThrowIfCancelled()
Remarks
This method is useful when you want to check the current transaction is cancelled and abort the current operation.
Example
function longRunningMethod() { var isCompleted = false; while(!isCompleted) { isCompleted = SomethingRunningLongTime(); // break if cancelled Script.ThrowIfCancelled(); } }