Align handling of configuration error with other plugins
Common approach is either re-throw it or let it be handled by caller.
This patch resolves to later as it produces readable exceptions e.g.:
2017-11-02 12:18:08,407|DEBUG|ReceiveCommits-1|EventUtil | Error in event listener
com.google.gerrit.server.events.StreamEventsApiListener for event
com.google.gerrit.server.extensions.events.GitReferenceUpdated java.lang.IllegalStateException:
Testing how exceptions are being handled
at com.googlesource.gerrit.plugins.webhooks.Configuration.<init>(Configuration.java:41)
at com.googlesource.gerrit.plugins.webhooks.Configuration$$FastClassByGuice$$a80ded4a.newInstance(<generated>)
at com.google.inject.internal.DefaultConstructionProxyFactory$FastClassProxy.newInstance(DefaultConstructionProxyFactory.java:89)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:111)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:90)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:268)
at ...
Change-Id: If11ec445c02ce43750b089baa6bb2998627573cd
Signed-off-by: Jacek Centkowski <jcentkowski@collab.net>
1 file changed