Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Current »

Overview

Throws an error if the current transaction is canceled.

void myScript.ThrowIfCancelled()

Remarks

This method is useful when you want to check the current transaction is canceled and abort the current operation.

Example

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

}
  • No labels