     try
       valueOrPromise = factory.apply null, dependencyValues
     catch error
-      return Promise.reject new hinoki.errors.ErrorInFactory path, container, error
+      return Promise.reject new hinoki.ThrowInFactoryError path, container, error
 
     unless hinoki.isThenable valueOrPromise
       # valueOrPromise is not a promise but an value

      .then (value) ->
        # note that a null value is allowed!
        if hinoki.isUndefined value
          return Promise.reject new hinoki.errors.FactoryReturnedUndefined newPath, resolution.container, resolution.factory

        # cache
        unless nocache

        }
        return value
      .catch (rejection) ->
        Promise.reject new hinoki.PromiseRejectedError path, container, rejection

  ###################################################################################
  # functions that resolve factories
