Versions Compared

Key

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

...

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

Example

Code Block
languagejs
Script.ThrowIfCancelled();

Examples

Code Block
languagejs
function longRunningMethod() {

  var isCompleted = false;

  while(!isCompleted) {

    isCompleted = SomethingRunningLongTime();

    // break if cancelled
    Script.ThrowIfCancelled();

  }

}