Возможно, вы должны использовать ifCompleteAsync вместо CompletableFuture.runAsync:
CompletableFuture<Long> cf = CompletableFuture.supplyAsync(() -> 1L)
.whenCompleteAsync((v, e) -> {
try {
Thread.sleep(1000);
System.out.println("HERE");
} catch(InterruptedException exc) {
//nothing
}
//check that thowing an exception also executes the next cf
throw new RuntimeException("exception");
})
.whenCompleteAsync((v, e) -> System.out.println("ALL DONE (exception thrown: " + e + ")"));
System.out.println("CF code finished");
System.out.println(cf.get());