function errorThrowerFactory(resolve) {
  return function() {
    resolve && resolve();
    throw ERROR_HANDLER_TEST_ERROR;
  };
}
A function that constructs functions that throw errors and call resolvers.
@param {!Function} resolve the resolver to call when.
@returns {Function!} the error thrower.