You might benefit from CheckedProviders in this scenario: http://code.google.com/p/google-guice/wiki/ThrowingProviders
On Tue, Jul 19, 2011 at 11:00 PM, laolaoyu <[email protected]> wrote: > Hi, > > I have a question regarding the usage of Guice constructor inject. > E.g. > > class A { > > public A () throws AException {...} > > } > > class B { > > final private A a; > > @Inject > public B (final A a) { > this.a = a; > } > } > > As in the above case, the injected A's constructor may throw > exception. How should I handle this exception when using Guice? > > Thanks. > > -- > You received this message because you are subscribed to the Google Groups > "google-guice" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/google-guice?hl=en. > > -- You received this message because you are subscribed to the Google Groups "google-guice" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-guice?hl=en.
