content: /*
   * Decompiled with CFR 0.153-SNAPSHOT (d6f6758-dirty).
   */
  package com.google.common.util.concurrent;
  
  import com.google.common.annotations.GwtIncompatible;
  import com.google.common.annotations.VisibleForTesting;
  import java.util.Locale;
  import java.util.logging.Level;
  import java.util.logging.Logger;
  
  @GwtIncompatible
  public final class UncaughtExceptionHandlers {
      private UncaughtExceptionHandlers() {
      }
  
      public static Thread.UncaughtExceptionHandler systemExit() {
          return new Exiter(Runtime.getRuntime());
      }
  
      @VisibleForTesting
      static final class Exiter
      implements Thread.UncaughtExceptionHandler {
          private static final Logger logger = Logger.getLogger(Exiter.class.getName());
          private final Runtime runtime;
  
          Exiter(Runtime runtime) {
              this.runtime = runtime;
          }
  
          /*
           * WARNING - Removed try catching itself - possible behaviour change.
           */
          @Override
          public void uncaughtException(Thread t, Throwable e) {
              try {
                  logger.log(Level.SEVERE, String.format(Locale.ROOT, "Caught an exception in %s.  Shutting down.", t), e);
              } catch (Throwable errorInLogging) {
                  System.err.println(e.getMessage());
                  System.err.println(errorInLogging.getMessage());
              } finally {
                  this.runtime.exit(1);
              }
          }
      }
  }
  
  