@Override protected CentralDogmaException newStorageExistsException(String name) { return new ProjectExistsException(name); }
@Override protected CentralDogmaException newStorageExistsException(String name) { return new ProjectExistsException(name); }
@Override protected CentralDogmaException newStorageExistsException(String name) { return new ProjectExistsException(name); }
/** * Creates a new project. */ DefaultProject(File rootDir, Executor repositoryWorker, @Nullable RepositoryCache cache, long creationTimeMillis, Author author) { requireNonNull(rootDir, "rootDir"); requireNonNull(repositoryWorker, "repositoryWorker"); if (rootDir.exists()) { throw new ProjectExistsException(rootDir.getName()); } name = rootDir.getName(); repos = newRepoManager(rootDir, repositoryWorker, cache); boolean success = false; try { createReservedRepos(creationTimeMillis); initializeMetadata(creationTimeMillis, author); success = true; } finally { if (!success) { repos.close(() -> new CentralDogmaException("failed to initialize internal repositories")); } } }
/** * Creates a new project. */ DefaultProject(File rootDir, Executor repositoryWorker, @Nullable RepositoryCache cache, long creationTimeMillis, Author author) { requireNonNull(rootDir, "rootDir"); requireNonNull(repositoryWorker, "repositoryWorker"); if (rootDir.exists()) { throw new ProjectExistsException(rootDir.getName()); } name = rootDir.getName(); repos = newRepoManager(rootDir, repositoryWorker, cache); boolean success = false; try { createReservedRepos(creationTimeMillis); initializeMetadata(creationTimeMillis, author); success = true; } finally { if (!success) { repos.close(() -> new CentralDogmaException("failed to initialize internal repositories")); } } }
/** * Creates a new project. */ DefaultProject(File rootDir, Executor repositoryWorker, @Nullable RepositoryCache cache, long creationTimeMillis, Author author) { requireNonNull(rootDir, "rootDir"); requireNonNull(repositoryWorker, "repositoryWorker"); if (rootDir.exists()) { throw new ProjectExistsException(rootDir.getName()); } name = rootDir.getName(); repos = newRepoManager(rootDir, repositoryWorker, cache); boolean success = false; try { createReservedRepos(creationTimeMillis); initializeMetadata(creationTimeMillis, author); success = true; } finally { if (!success) { repos.close(() -> new CentralDogmaException("failed to initialize internal repositories")); } } }
break; case PROJECT_EXISTS: convertedCause = new ProjectExistsException(message, false); break; case REPOSITORY_NOT_FOUND:
break; case PROJECT_EXISTS: convertedCause = new ProjectExistsException(message, false); break; case REPOSITORY_NOT_FOUND:
break; case PROJECT_EXISTS: convertedCause = new ProjectExistsException(message, false); break; case REPOSITORY_NOT_FOUND: