Revision: 1416
Author: sberlin
Date: Sun Nov 21 07:22:30 2010
Log: Edited wiki page ProvidesMethods through web user interface.
http://code.google.com/p/google-guice/source/detail?r=1416
Modified:
/wiki/ProvidesMethods.wiki
=======================================
--- /wiki/ProvidesMethods.wiki Mon Mar 2 21:05:27 2009
+++ /wiki/ProvidesMethods.wiki Sun Nov 21 07:22:30 2010
@@ -26,3 +26,6 @@
return processor;
}
}}}
+
+===Throwing Exceptions===
+Guice does not allow exceptions to be thrown from Providers. Exceptions
thrown by @Provides methods will be wrapped in a !ProvisionException. It
is bad practice to allow any kind of exception to be thrown -- runtime or
checked -- from an @Provides method. If you need to throw an exception for
some reason, you may want to use the [ThrowingProviders ThrowingProviders
extension] @!CheckedProvides methods.
--
You received this message because you are subscribed to the Google Groups
"google-guice-dev" group.
To post to this group, send email to google-guice-...@googlegroups.com.
To unsubscribe from this group, send email to
google-guice-dev+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/google-guice-dev?hl=en.