Open GoogleCodeExporter opened 9 years ago
Note: we are using a snapshot build of the trunk of mid-september 2010.
Original comment by mathieu....@gmail.com
on 23 Sep 2010 at 3:50
Why do you need to wrap it in a ProvisionException? If the target is a runtime
exception or error, can you just rethrow it directly? And if it's a checked
exception, is there a reasonable error message you can provide that's not a
duplicate of the exception message? Something like, "Error calling <some user
method>"?
Original comment by sberlin
on 24 Sep 2010 at 2:34
Yes you're right i could do that i think. I've used the Guice's provision
exception because it's an injection listener which inject resource bundles,
nearly like Google Sitebrick does or Guiceyfruit does for the JSR250 support.
Since its injection stuff, I think a provision exception is a good business
exception which can be thrown when an exception occurs in injection.
Isn't the case ?
Original comment by mathieu....@gmail.com
on 24 Sep 2010 at 12:24
I think Guice should take care of wrapping any user exceptions into a
ProvisionException before it hits user code. (You should check on this,
though.)
Original comment by sberlin
on 24 Sep 2010 at 12:56
There is a related issue on the guicey-fruit issue tracker, which are
struggling with the same issue :
http://code.google.com/p/guiceyfruit/issues/detail?id=27
Original comment by timo.wes...@gmail.com
on 12 Nov 2010 at 1:10
Original issue reported on code.google.com by
mathieu....@gmail.com
on 23 Sep 2010 at 3:49