...
This method is useful when you want to check the current transaction is cancelled canceled and abort the current operation.
Example
Code Block | ||
---|---|---|
| ||
Script.ThrowIfCancelled(); |
Examples
Code Block | ||
---|---|---|
| ||
function longRunningMethod() { var isCompleted = false; while(!isCompleted) { isCompleted = SomethingRunningLongTime(); // break if cancelled Script.ThrowIfCancelled(); } } |