Externalize parsing exception message for RebaseCommand#Action

Change-Id: Id0d7801e4de98bf118dbecadf623c9ffd7ab7554
This commit is contained in:
Tomasz Zarna 2012-04-02 11:36:29 +02:00
parent 6189a68d1d
commit 622232b936
3 changed files with 5 additions and 5 deletions

View File

@ -476,6 +476,7 @@ unexpectedOddResult=odd: {0} + {1} - {2}
unexpectedRefReport={0}: unexpected ref report: {1}
unexpectedReportLine=unexpected report line: {0}
unexpectedReportLine2={0} unexpected report line: {1}
unknownOrUnsupportedCommand=Unknown or unsupported command "{0}", only "{1}" is allowed.
unknownDIRCVersion=Unknown DIRC version {0}
unknownHost=unknown host
unknownIndexVersionOrCorruptIndex=Unknown index version (or corrupt index): {0}

View File

@ -955,11 +955,9 @@ public String toToken() {
static Action parse(String token) {
if (token.equals("pick") || token.equals("p"))
return PICK;
throw new JGitInternalException(
MessageFormat
.format(
"Unknown or unsupported command \"{0}\", only \"pick\" is allowed",
token));
throw new JGitInternalException(MessageFormat.format(
JGitText.get().unknownOrUnsupportedCommand, token,
PICK.toToken()));
}
}

View File

@ -536,6 +536,7 @@ public static JGitText get() {
/***/ public String unexpectedRefReport;
/***/ public String unexpectedReportLine;
/***/ public String unexpectedReportLine2;
/***/ public String unknownOrUnsupportedCommand;
/***/ public String unknownDIRCVersion;
/***/ public String unknownHost;
/***/ public String unknownIndexVersionOrCorruptIndex;