Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337602195
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337401912
Guice currently has an Exception called ErrorsException that is used to signal certain kinds of errors. The general strategy is either to
* call Errors.addError if you come across an error but can keep going
* call throw Errors.addError(...).toException() to report an error when you can't keep going
The second option throws an ErrorsException. Which is then caught at various api boundaries. The idea in this cl is to introduce a parallel API called InternalProvisionException which can take over the analogous usecases for provisioning time errors and ErrorsException will be preserved for configuration time errors. ErrorsException will be renamed to InternalConfigurationException after InternalProvisionException is fully integrated.
This also refactors Errors.java to move a bunch of static utilities for dealing with Message objects to a new class Messages
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=177714992
configure a presubmit to ensure that it stays formatted.
Highlights include:
* simplified import order
* method annotations are now consistently defined on the preceding line
* javadoc reformatted to 100 chars column width
One test that contained line numbers in error messages had to be modified and
the formatter didn't like some of the more complicated preprocessor directives
(MOE and AOP).
To avoid formatting the copyright notices as javadoc i did a preprocessing step to rewrite the initial '/**' to '/*' using perl
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=132718493
99% of this is adding missing @Override annotations, in the long tail we also have
* insert missing calls to Assert.fail() in tests that are testing exception behavior
* rewrite a few cases of Foo.class.instanceof(c) to c instanceof Foo
* rewrite Class.newInstance - > Class.getConstructor().newInstance() which doesn't break checked exception checking.
* adding @javax.inject.Inject annotations to methods that override methods annotated with @javax.inject.Inject
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=131839622
* Sort imports
* Convert tabs to spaces
* Fix the ant no_aop build
Revision created by MOE tool push_codebase.
MOE_MIGRATION=2532
git-svn-id: https://google-guice.googlecode.com/svn/trunk@1572 d779f126-a31b-0410-b53b-1d3aecad763e