title: Guice caused throwing UncaughtExceptionHandler
body: <p>I would like to use Guice in my application but it throws following exception when I want to run it:</p>
  
  <pre><code>Exception in thread "main" 
  Exception: com.google.common.util.concurrent.UncheckedExecutionException thrown from the UncaughtExceptionHandler in thread "main"
  </code></pre>
  
  <p>When I wrap <code>main()</code> function with try... catch block I receive folloving stackTrace:</p>
  
  <pre><code>Exception in thread "main" com.google.common.util.concurrent.UncheckedExecutionException: java.lang.IllegalArgumentException
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2047)
      at com.google.common.cache.LocalCache.get(LocalCache.java:3869)
      at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3873)
      at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4798)
      at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:4804)
      at com.google.inject.internal.util.StackTraceElements.forMember(StackTraceElements.java:71)
      at com.google.inject.internal.Messages.formatSource(Messages.java:241)
      at com.google.inject.internal.Messages.formatSource(Messages.java:220)
      at com.google.inject.internal.Messages.formatMessages(Messages.java:90)
      at com.google.inject.CreationException.getMessage(CreationException.java:50)
      at java.base/java.lang.Throwable.getLocalizedMessage(Throwable.java:396)
      at java.base/java.lang.Throwable.toString(Throwable.java:485)
      at java.base/java.lang.String.valueOf(String.java:2788)
      at java.base/java.io.PrintStream.println(PrintStream.java:897)
      at java.base/java.lang.Throwable$WrappedPrintStream.println(Throwable.java:752)
      at java.base/java.lang.Throwable.printStackTrace(Throwable.java:659)
      at java.base/java.lang.Throwable.printStackTrace(Throwable.java:648)
      at java.base/java.lang.Throwable.printStackTrace(Throwable.java:639)
      at com.github.blackjack.Main.main(Main.java:31)
  Caused by: java.lang.IllegalArgumentException
      at com.google.inject.internal.asm.$ClassReader.&lt;init&gt;(ClassReader.java:160)
      at com.google.inject.internal.asm.$ClassReader.&lt;init&gt;(ClassReader.java:143)
      at com.google.inject.internal.asm.$ClassReader.&lt;init&gt;(ClassReader.java:418)
      at com.google.inject.internal.util.LineNumbers.&lt;init&gt;(LineNumbers.java:64)
      at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:49)
      at com.google.inject.internal.util.StackTraceElements$1.load(StackTraceElements.java:45)
      at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3443)
      at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2169)
      at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2128)
      at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2041)
      ... 18 more
  </code></pre>
  
  <p>From the information I found this exception was caused by method contains a lambda definition, is thrown by Provides method. Nevertheless it should be fixed with Guice 4.0. Maybe someone know how to fix it and can help?
  Thanks in advance!</p>
  
  <p><code>main()</code> function:</p>
  
  <pre><code>public static void main (String[] args){
      try{
          MainModule module = new MainModule();
          Injector injector = Guice.createInjector(module);
  
          GameFactory gameFactory = injector.getInstance(GameFactory.class);
          DeckFactory blackjackDeckFactory = injector.getInstance(BlackjackDeckCreator.class);
          PlayerFactory playerFactory = injector.getInstance(PlayerFactory.class);
  
          Player player = playerFactory.createPlayer("Paul");
          Player dealer = playerFactory.createPlayer("Dealer", true);
  
          Deck deck = blackjackDeckFactory.createDeck();
  
          Game game = gameFactory.createGame(player, dealer, deck);
          game.start();
      } catch (Exception e){
          e.printStackTrace(); // line 31
      }
  }
  </code></pre>