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