throwNext method

void throwNext(
  1. int count,
  2. Object error
)

Makes the next count batches throw error.

Implementation

void throwNext(int count, Object error) {
  for (var i = 0; i < count; i++) {
    _script.add((_) => throw error);
  }
}