Ref: remove duplicate handle code
This commit is contained in:
@@ -19,7 +19,9 @@
|
||||
|
||||
package com.sheepit.client.exception;
|
||||
|
||||
public class SheepItExceptionBadResponseFromServer extends SheepItException {
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
|
||||
public class SheepItExceptionBadResponseFromServer extends SheepItExceptionWithRequiredWait {
|
||||
public SheepItExceptionBadResponseFromServer() {
|
||||
super();
|
||||
}
|
||||
@@ -27,4 +29,12 @@ public class SheepItExceptionBadResponseFromServer extends SheepItException {
|
||||
public SheepItExceptionBadResponseFromServer(String message_) {
|
||||
super(message_);
|
||||
}
|
||||
|
||||
public String getHumanText() {
|
||||
return "Bad answer from the server. Will try again at %tR";
|
||||
}
|
||||
|
||||
public int getWaitDuration() {
|
||||
return 1000 * 60 * ThreadLocalRandom.current().nextInt(15, 30 + 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user