function addCatchAll(var_args) {
  for (let i = 0, d; d = arguments[i]; i++) {
    d.addErrback(function(res) {
      storedErrors.push(res);
    });
  }
}
Adds a catch-all error handler to deferred objects. Unhandled errors that
reach the catch-all will be rethrown during tearDown.

@param {...Deferred} var_args A list of deferred objects.