Repository: aurora Updated Branches: refs/heads/master 103f794ed -> 6c897e520
Remove hack for guice error logging With `103f794ed126e135f2fe0ff1bde04a4093413521`, this hack is no longer needed. Reviewed at https://reviews.apache.org/r/64426/ Project: http://git-wip-us.apache.org/repos/asf/aurora/repo Commit: http://git-wip-us.apache.org/repos/asf/aurora/commit/6c897e52 Tree: http://git-wip-us.apache.org/repos/asf/aurora/tree/6c897e52 Diff: http://git-wip-us.apache.org/repos/asf/aurora/diff/6c897e52 Branch: refs/heads/master Commit: 6c897e5207db67b222d9c693baeb94de381d6c6f Parents: 103f794 Author: Bill Farner <[email protected]> Authored: Thu Dec 7 10:35:45 2017 -0800 Committer: Bill Farner <[email protected]> Committed: Thu Dec 7 10:35:45 2017 -0800 ---------------------------------------------------------------------- .../aurora/scheduler/app/SchedulerMain.java | 27 +------------------- 1 file changed, 1 insertion(+), 26 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/aurora/blob/6c897e52/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java index 7ffcf4f..2bf7e7b 100644 --- a/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java +++ b/src/main/java/org/apache/aurora/scheduler/app/SchedulerMain.java @@ -28,12 +28,9 @@ import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.net.HostAndPort; import com.google.inject.AbstractModule; -import com.google.inject.CreationException; import com.google.inject.Guice; import com.google.inject.Injector; import com.google.inject.Module; -import com.google.inject.ProvisionException; -import com.google.inject.spi.Message; import com.google.inject.util.Modules; import org.apache.aurora.GuavaUtils.ServiceManagerIface; @@ -204,29 +201,7 @@ public class SchedulerMain { Thread.setDefaultUncaughtExceptionHandler((t, e) -> { uncaughtExceptions.incrementAndGet(); - if (e instanceof CreationException) { - try { - LOG.error("Uncaught exception from " + t + ":" + e, e); - } catch (RuntimeException ex) { - LOG.warn("Using fallback printer for guice CreationException"); - - // Special handling for guice creation exceptions, which break in guice 3 when java 8 - // lambdas are used. Remove this once using guice >=4.0. - CreationException creationException = (CreationException) e; - for (Message m : creationException.getErrorMessages()) { - LOG.error(m.getMessage()); - LOG.error(" source: " + m.getSource()); - } - } - } else if (e instanceof ProvisionException) { - // More special handling for guice 3 + java 8. Remove this once using guice >=4.0. - ProvisionException pe = (ProvisionException) e; - for (Message message : pe.getErrorMessages()) { - LOG.error(message.getMessage()); - } - } else { - LOG.error("Uncaught exception from " + t + ":" + e, e); - } + LOG.error("Uncaught exception from " + t + ":" + e, e); }); Module module = Modules.combine(
