Make ProvisionException stack traces from @Provides methods clearer -- don't include all the intermediary RuntimeExceptions & InvocationTargetExceptions. Just include the user's exception (even for checked exceptions). Before this, a stack trace from a ProvisionException looked like:
-----
1) Error in custom provider, java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.google.inject.ProvisionExceptionsTest$5.exploder(ProvisionExceptionsTest.java:134)
[while locating...]
1 error
at stack.to.where.injector.was.called
Caused by java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at more.confusing.stacktraces
Caused by java.lang.reflect.InvocationTargetException
at more.confusing.stacktraces
Caused by UserException: UserExceptionMessage
at where.the.user.got.involved
-----
Now it looks like:
1) Error in custom provider, UserException: UserExceptionMessage
at com.google.inject.ProvisionExceptionsTest$5.exploder(ProvisionExceptionsTest.java:134)
[while locating...]
1 error
at stack.to.where.injector.was.called
Caused by UserException: UserExceptionMessage
at stack.to.where.the.user.got.involved
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1191 d779f126-a31b-0410-b53b-1d3aecad763e
4 files changed