Open GoogleCodeExporter opened 9 years ago
Original comment by limpbizkit
on 22 Jun 2009 at 2:03
The attached patch adds some APIs so that you can do:
new AbstractModule() {
public void configure() {
ThrowingProviderBinder.install(this, binder());
}
@ThrowingProvides(MyThrowingProviderInterface.class)
Foo foo(Factory dep1, Baz dep2) throws SomeException {
return dep1.getOrThrowUsing(dep2);
}
}
Scopes & annotations are fully supported. A "provides" variation of each test
was added, and some new tests to make sure that the exceptions in the provider
method match those in the ThrowingProvider interface.
It also cleans up some bits internally in ThrowingProviderBinder so that it
uses binder.addError instead of throwing an exception if the ThrowingProvider
interface isn't compliant.
Original comment by sberlin
on 24 Oct 2010 at 4:22
Attachments:
fixed in r1312. please review!
Original comment by sberlin
on 24 Oct 2010 at 9:37
Original issue reported on code.google.com by
limpbizkit
on 8 May 2009 at 8:36