Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

Throws an error if the current transaction is cancelled.

void myScript.ThrowIfCancelled()

...

Example

Code Block
languagejs
function longRunningMethod() {
  
  var isCompleted = false;
  
  while(!isCompleted) {
  
    isCompleted = SomethingRunningLongTime();
    
    // break if cancelled
    Script.ThrowIfCancelled();
    
  }

}