Skip to content

Commit

Permalink
Add an exception of the instantiation of the process moniter
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Feb 12, 2022
1 parent 38d1a33 commit 1e42d8b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package com.neuronrobotics.bowlerstudio.scripting;

public interface GitLogProgressMonitor {
public abstract void onUpdate(String update);
public abstract void onUpdate(String update, Exception e);
}
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ private static Git cloneRepo(String remoteURI, String branch, File dir)

private static ProgressMonitor getProgressMoniter(String type, String remoteURI) {
String reponame = getRepositoryCloneDirectory(remoteURI).getName();
Exception e = new Exception();
return new ProgressMonitor() {
double total = 1;
double sum;
Expand All @@ -227,8 +228,9 @@ public void update(int completed) {
timeofLastUpdate = System.currentTimeMillis();
}
System.err.println(str);

for (GitLogProgressMonitor l : logListeners) {
l.onUpdate(str);
l.onUpdate(str,e);
}
}

Expand All @@ -247,7 +249,7 @@ public void endTask() {
String string = "DONE! " + type + " " + reponame + " " + stage;
System.out.println(string);
for (GitLogProgressMonitor l : logListeners) {
l.onUpdate(string);
l.onUpdate(string,e);
}
}

Expand Down

0 comments on commit 1e42d8b

Please sign in to comment.