DataNode<ProjectData> (ProjectConnection connection) { ExternalSystemTaskId taskId = myResolverContext.getExternalSystemTaskId(); final long activityId = taskId.getId(); try { myCancellationMap.putValue(taskId, myResolverContext.getCancellationTokenSource()); myResolverContext.setConnection(connection); return doResolveProjectInfo(myResolverContext, myProjectResolverChain, myIsBuildSrcProject); } catch (ProcessCanceledException e) { throw e; } catch (RuntimeException e) { LOG.info("Gradle project resolve error", e); ExternalSystemException esException = ExceptionUtil.findCause(e, ExternalSystemException.class); if (esException != null && esException != e) { LOG.info("\nCaused by: " + esException.getOriginalReason()); } ExternalSystemSyncActionsCollector.logError(taskId.findProject(), activityId, extractCause(e)); ExternalSystemSyncActionsCollector.logSyncFinished(taskId.findProject(), activityId, false); syncMetrics.endSpan(ExternalSystemSyncDiagnostic.gradleSyncSpanName, (span) -> span.setAttribute("project", "")); throw myProjectResolverChain.getUserFriendlyError( myResolverContext.getBuildEnvironment(), e, myResolverContext.getProjectPath(), null); } finally { myCancellationMap.remove(taskId, myResolverContext.getCancellationTokenSource()); } }