function throwException(exception) {
  // Each throw needs to be in its own context.
  goog.global.setTimeout(() => {
    throw exception;
  }, 0);
}
Throw an item without interrupting the current execution context.  For
example, if processing a group of items in a loop, sometimes it is useful
to report an error while still allowing the rest of the batch to be
processed.
@param {*} exception