Distinguish between error and timeout in intraline diff error message
When the intraline diff fails, the error message simply says that there was a server error. It could be that the reason for failure is a timeout, but it's not possible to know this from the error message. Add a new error message that is displayed when the intraline diff fails due to timeout. Also update the documentation to mention that an error message is displayed if the intraline diff times out. Change-Id: I93410d853aadc7ed1f6e4324d0578c4bcbe4e195
This commit is contained in:
@@ -36,6 +36,7 @@ public interface PatchConstants extends Constants {
|
||||
String patchHistoryTitle();
|
||||
String disabledOnLargeFiles();
|
||||
String intralineFailure();
|
||||
String intralineTimeout();
|
||||
String illegalNumberOfColumns();
|
||||
|
||||
String upToChange();
|
||||
|
||||
@@ -18,6 +18,7 @@ patchHistoryTitle = Patch History
|
||||
patchSet = Patch Set
|
||||
disabledOnLargeFiles = Disabled on very large source files.
|
||||
intralineFailure = Intraline difference not available due to server error.
|
||||
intralineTimeout = Intraline difference not available due to timeout.
|
||||
illegalNumberOfColumns = The number of columns cannot be zero or negative
|
||||
|
||||
upToChange = Up to change
|
||||
|
||||
@@ -120,6 +120,7 @@ public abstract class PatchScreen extends Screen implements
|
||||
private HandlerRegistration regNavigation;
|
||||
private HandlerRegistration regAction;
|
||||
private boolean intralineFailure;
|
||||
private boolean intralineTimeout;
|
||||
|
||||
/**
|
||||
* How this patch should be displayed in the patch screen.
|
||||
@@ -468,6 +469,7 @@ public abstract class PatchScreen extends Screen implements
|
||||
}
|
||||
|
||||
intralineFailure = isFirst && script.hasIntralineFailure();
|
||||
intralineTimeout = isFirst && script.hasIntralineTimeout();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -476,6 +478,9 @@ public abstract class PatchScreen extends Screen implements
|
||||
if (intralineFailure) {
|
||||
intralineFailure = false;
|
||||
new ErrorDialog(PatchUtil.C.intralineFailure()).show();
|
||||
} else if (intralineTimeout) {
|
||||
intralineTimeout = false;
|
||||
new ErrorDialog(PatchUtil.C.intralineTimeout()).show();
|
||||
}
|
||||
if (topView != null && prefs.get().isRetainHeader()) {
|
||||
setTopView(topView);
|
||||
|
||||
Reference in New Issue
Block a user