Execute the Retryable
code with specified number of retries.
int retries = 0;
while (true) {
try {
exe.execute();
break;
} catch (IOException e) {
retries++;
if (retries > this.retriesAllowed && this.retriesAllowed > -1) {
task.log("try #" + retries + ": IO error ("
+ desc + "), number of maximum retries reached ("
+ this.retriesAllowed + "), giving up", Project.MSG_WARN);
throw e;
} else {
task.log("try #" + retries + ": IO error (" + desc
+ "), retrying", Project.MSG_WARN);
}
}
}