def _finished_callback(self, batch_fut, todo):
    self._running.remove(batch_fut)
    err = batch_fut.get_exception()
    if err is not None:
      tb = batch_fut.get_traceback()
      for (fut, _) in todo:
        if not fut.done():
          fut.set_exception(err, tb)
Passes exception along.
dataset/ETHPy150Open AppScale/appscale/AppServer/google/appengine/ext/ndb/context.py/AutoBatcher._finished_callback