frjaeger220 / google-guice

Automatically exported from code.google.com/p/google-guice
Apache License 2.0
0 stars 0 forks source link

Improve Circular Dependency Error Message #139

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Right now, a circular dependency produces the following error msg: 
com.google.inject.ConfigurationException: Tried proxying Circle to support 
a circular dependency, but it is not an interface.

It would be very useful if this message was improved to show who the 
players in the circular dependency are.  That is, if class Circle depends 
on SquareHole and SquareHole depends on Circle, the message could say 
that's what it's failing.  This would make fixing the problem much easier.

Here's a fuller stack trace, for reference: 

com.google.inject.ConfigurationException: Tried proxying Circle to support 
a circular dependency, but it is not an interface.
        at com.google.inject.ConstructionContext.createProxy
(ConstructionContext.java:70)
        at com.google.inject.ConstructorInjector.construct
(ConstructorInjector.java:126)
        at [... lots of internal guice calls ...]
        at com.google.inject.InjectorImpl.getInstance
(InjectorImpl.java:728)
        at [... my code ...]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.limegroup.gnutella.gui.Main.main(Main.java:47)

Original issue reported on code.google.com by sberlin on 6 Aug 2007 at 9:56

GoogleCodeExporter commented 9 years ago
Will be addressed by issue 220...

Original comment by limpbizkit on 2 Nov 2008 at 9:46