throwIfCancelled method

void throwIfCancelled()

Throw an exception if the token is cancelled

Implementation

void throwIfCancelled() {
  if (_isCancelled) {
    throw ZenCancellationException(message ?? 'Operation cancelled');
  }
}