Ok, I'll write a test for that case and support it.


On Mon, Apr 14, 2014 at 11:19 AM, Pavel Jbanov <notifications@github.com>wrote:

> In lib/injector.dart:
>
> > @@ -109,14 +109,9 @@ class Injector {
> >      }
> >
> >      var value;
> > -    try {
> > -      resolving.add(key);
> > -      value = provider.get(this, requester, _getInstanceByKey, _error);
> > -      resolving.removeLast();
> > -    } catch(e) {
> > -      resolving.clear();
>
> provider.get(...) can through for many reasons: factory function throws,
> constructor throws, misconfiguration, etc.
> In any case, leaving injector in an inconsistent/unusable state after a
> user error will not do -- it might be needed to correctly report/log the
> error.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/angular/di.dart/pull/84/files#r11599513>
> .
>