message: refactor(scheduleIterable): use utility function
diff: @@ -3,6 +3,7 @@ import { Observable } from '../Observable';
  import { SchedulerLike } from '../types';
  import { iterator as Symbol_iterator } from '../symbol/iterator';
  import { isFunction } from '../util/isFunction';
  +import { caughtSchedule } from '../util/caughtSchedule';
  /**
  * Used in {@link scheduled} to create an observable from an Iterable.
  @@ -22,20 +23,14 @@ export function scheduleIterable<T>(input: Iterable<T>, scheduler: SchedulerLike
  iterator = (input as any)[Symbol_iterator]();
  // Schedule the first iteration and emission.
  - subscriber.add(
  - scheduler.schedule(function () {
  + caughtSchedule(subscriber, scheduler, function () {
  // Check to make sure teardown was not triggered
  // by the consumer since the last iteration.
  if (!subscriber.closed) {
  let value: T;
  let done: boolean | undefined;
  - try {
  // Pull the value out of the iterator
  ({ value, done } = iterator.next());
  - } catch (err) {
  - subscriber.error(err);
  - return;
  - }
  if (done) {
  // If it is "done" we just complete. This mimics the
  // behavior of JavaScript's `for..of` consumption of
  @@ -50,8 +45,7 @@ export function scheduleIterable<T>(input: Iterable<T>, scheduler: SchedulerLike
  this.schedule();
  }
  }
  - })
  - );
  + });
  })
  );
  