CommandException: provide message for printing.
This commit is contained in:
parent
0516eacfe5
commit
d79b221940
2 changed files with 6 additions and 1 deletions
|
@ -23,6 +23,11 @@ public class CommandException extends RuntimeException {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getMessage() {
|
||||||
|
return message;
|
||||||
|
}
|
||||||
|
|
||||||
public CommandException message(String message) {
|
public CommandException message(String message) {
|
||||||
this.message = message;
|
this.message = message;
|
||||||
return this;
|
return this;
|
||||||
|
|
|
@ -172,7 +172,7 @@ public class SetTbrCommand implements Command {
|
||||||
private void verifyDisplayedTbrPercentage(RuffyScripter scripter) {
|
private void verifyDisplayedTbrPercentage(RuffyScripter scripter) {
|
||||||
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
scripter.verifyMenuIsDisplayed(MenuType.TBR_SET);
|
||||||
long displayedPercentage = readDisplayedTbrPercentage(scripter);
|
long displayedPercentage = readDisplayedTbrPercentage(scripter);
|
||||||
if (displayedPercentage != this.percentage) {
|
if (displayedPercentage != percentage) {
|
||||||
log.debug("Final displayed TBR percentage: " + displayedPercentage);
|
log.debug("Final displayed TBR percentage: " + displayedPercentage);
|
||||||
throw new CommandException().message("Failed to set TBR percentage");
|
throw new CommandException().message("Failed to set TBR percentage");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue