CompletableFuture - Exception Cause / Stack trace not available

101 views Asked by At

I have an async application. By executing for example the async method getTest() I never get the full strack trace caused the error:

CompletableFuture<Test> test = myAdapter.getTest();
test.whenComplete((result, e) -> {
   if (e != null) {
      // do some stuff
   }
});

If an IllegalstateException is thrown, the strack trace is not available. The only thing I can see is that the CompletionException was caused by an IllegalstateException:

enter image description here

This makes it very hard to find out where for example a NullPointerException is coming from.

enter image description here

0

There are 0 answers