static @NotNull ExitCode reportError(CompileContext context, String placePresentableName, Exception error) {
    @Nls StringBuilder builder = new StringBuilder().append(JpsBuildBundle.message("build.message.error.resolving.dependencies.for",
                                                                                   placePresentableName));
    Throwable th = error;
    final Set<Throwable> processed = new HashSet<>();
    final Set<String> detailsMessage = new HashSet<>();
    while (th != null && processed.add(th)) {
      String details = th.getMessage();
      if (th instanceof UnknownHostException) {
        details = JpsBuildBundle.message("build.message.unknown.host.0", details); // hack for UnknownHostException
      }
      if (details != null && detailsMessage.add(details)) {
        builder.append(":\n").append(details);
      }
      th = th.getCause();
    }
    final String msg = builder.toString();
    LOG.info(msg, error);
    context.processMessage(new CompilerMessage(getBuilderName(), BuildMessage.Kind.ERROR, msg));
    return ExitCode.ABORT;
  }
static @NotNull ExitCode reportError(CompileContext context, String placePresentableName, Exception error)