title: JavaFX's task seem to consume exceptions. Is it a bug or a feature?
body: <p>Consider this code:</p>
  
  <pre><code>Thread.setDefaultUncaughtExceptionHandler((Thread t, Throwable e) -&gt; {
      System.out.println("An exception occurred!");
  });
  
  // set the exception handler for the JavaFX application thread
  Thread.currentThread().setUncaughtExceptionHandler((Thread t, Throwable e) -&gt; {
      System.out.println("An exception occurred!");
  });
  
  Task&lt;?&gt; task = new Task() {
      @Override
      public Void call() throws Exception {
          throw new RuntimeException("foobar");
      };
  };
  
  new Thread(task).start();
  </code></pre>
  
  <p>If we run the code the runtime exception never triggers the default exception handler but is instead consumed by the task. The only way to counteract this that I found is to rethrow the exception in task.setOnFailed:</p>
  
  <pre><code>task.setOnFailed((WorkerStateEvent t) -&gt; {
      throw new RuntimeException(task.getException());
  });
  </code></pre>
  
  <p>Since JavaFX 8 now has support for the UncaughtExceptionHandler why isn't the exception propagated to the exception handler?</p>