         a: -> throw exception
 
     hinoki.get(c, 'a').catch hinoki.errors.ErrorInFactory, (error) ->
-      test.equal error.message, "error in factory for 'a'. original error message: fail"
+      test.equal error.message, "error in factory for 'a'. original error: Error: fail"
       test.deepEqual error.path, ['a']
       test.equal error.container, c
       test.equal error.error, exception

          x

      hinoki.get(c, 'a').catch hinoki.errors.ErrorInResolvers, (error) ->
        test.equal error.message, "error in resolvers for 'a' (a). original error message: fail"
        test.deepEqual error.path, ['a']
        test.equal error.error, x
        test.ok not c.promisesAwaitingResolution?

        a: -> Promise.reject rejection

    hinoki.get(c, 'a').catch hinoki.errors.PromiseRejected, (error) ->
      test.equal error.message, "promise returned from factory for 'a' was rejected. original error: Error: fail"
      test.deepEqual error.path, ['a']
      test.equal error.container, c
      test.equal error.error, rejection
