CompletableFuture<StackFrameDescriptorImpl> (@NotNull StackFrameProxyImpl frame, @NotNull MethodsTracker tracker) { return frame.locationAsync() .thenCompose(DebuggerUtilsAsync::method) .thenApply(method -> new StackFrameDescriptorImpl(frame, method, tracker)) .exceptionally(throwable -> { Throwable exception = DebuggerUtilsAsync.unwrap(throwable); if (exception instanceof EvaluateException) { // TODO: simplify when only async method left if (!(exception.getCause() instanceof InvalidStackFrameException)) { LOG.error(exception); } return new StackFrameDescriptorImpl(frame, tracker); // fallback to sync } throw (RuntimeException)throwable; }); }