mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 21:31:36 +02:00
Add stack trace prints and remove bugged git config.
This commit is contained in:
@@ -7,6 +7,7 @@ import org.eclipse.jgit.transport.ServiceMayNotContinueException;
|
||||
import uk.ac.ic.wlgitbridge.bridge.RepositorySource;
|
||||
import uk.ac.ic.wlgitbridge.bridge.WLBridgedProject;
|
||||
import uk.ac.ic.wlgitbridge.bridge.WriteLatexDataSource;
|
||||
import uk.ac.ic.wlgitbridge.util.Util;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.api.request.push.exception.InternalErrorException;
|
||||
|
||||
import java.io.File;
|
||||
@@ -35,6 +36,7 @@ public class SnapshotRepositoryBuilder implements RepositorySource {
|
||||
repository = new FileRepositoryBuilder().setWorkTree(repositoryDirectory).build();
|
||||
new WLBridgedProject(repository, name, writeLatexDataSource).buildRepository();
|
||||
} catch (IOException e) {
|
||||
Util.printStackTrace(e);
|
||||
throw new ServiceMayNotContinueException(new InternalErrorException().getDescriptionLines().get(0));
|
||||
}
|
||||
return repository;
|
||||
|
||||
@@ -18,7 +18,7 @@ public class InternalErrorException extends SevereSnapshotPostException {
|
||||
|
||||
@Override
|
||||
public List<String> getDescriptionLines() {
|
||||
return Arrays.asList("There as an internal error with the Git server.",
|
||||
return Arrays.asList("There was an internal error with the Git server.",
|
||||
"Please contact " + Util.getServiceName() + ".");
|
||||
}
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import com.ning.http.client.Response;
|
||||
import org.eclipse.jgit.lib.Repository;
|
||||
import uk.ac.ic.wlgitbridge.bridge.RawFile;
|
||||
import uk.ac.ic.wlgitbridge.git.util.RepositoryObjectTreeWalker;
|
||||
import uk.ac.ic.wlgitbridge.util.Util;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.api.request.exception.FailedConnectionException;
|
||||
import uk.ac.ic.wlgitbridge.writelatex.filestore.RepositoryFile;
|
||||
|
||||
@@ -57,8 +58,10 @@ public class ResourceFetcher {
|
||||
|
||||
}).get();
|
||||
} catch (InterruptedException e) {
|
||||
Util.printStackTrace(e);
|
||||
throw new FailedConnectionException();
|
||||
} catch (ExecutionException e) {
|
||||
Util.printStackTrace(e);
|
||||
throw new FailedConnectionException();
|
||||
}
|
||||
urlIndexStore.addURLIndexForProject(projectName, url, path);
|
||||
|
||||
Reference in New Issue
Block a user