private static void throwExceptions(@NotNull List<? extends Throwable> exceptions) {
    if (exceptions.size() == 1) {
      ExceptionUtil.rethrow(exceptions.get(0));
    }
    else {
      for (Throwable exception : exceptions) {
        if (exception instanceof ProcessCanceledException) {
          throw (ProcessCanceledException)exception;
        }
      }
      throw new CompoundRuntimeException(exceptions);
    }
  }
private static void throwExceptions(@NotNull List<? extends Throwable> exceptions)