How do you want to handle the exception is the question? You'd get a ProvisionException from Guice in this case.
On Tue, Jul 19, 2011 at 11:12 PM, laolaoyu <[email protected]> wrote: > Modification on the above example: > > public interface A { > } > > public class AImpl implements A { > > public AImpl () throws AException {...} > > } > > AImpl has been bound to A. > > On Jul 20, 11:00 am, 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.
