mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Throwing RepositoryNotFoundException when not found.
This commit is contained in:
parent
2c64fb0e4f
commit
c42db9eb8b
1 changed files with 7 additions and 0 deletions
|
@ -25,6 +25,13 @@ public class SnapshotRepositoryBuilder implements RepositorySource {
|
|||
|
||||
@Override
|
||||
public Repository getRepositoryWithNameAtRootDirectory(String name, File rootDirectory) throws RepositoryNotFoundException, ServiceNotEnabledException {
|
||||
try {
|
||||
if (!writeLatexDataSource.repositoryExists(name)) {
|
||||
throw new RepositoryNotFoundException(name);
|
||||
}
|
||||
} catch (FailedConnectionException e) {
|
||||
throw new ServiceNotEnabledException();
|
||||
}
|
||||
File repositoryDirectory = new File(rootDirectory, name);
|
||||
|
||||
Repository repository = null;
|
||||
|
|
Loading…
Reference in a new issue