Rewrite some error messages for wrong argument amounts
This commit is contained in:
parent
b53e7a617d
commit
1c48b1861f
1 changed files with 7 additions and 5 deletions
|
@ -67,16 +67,18 @@ public final class Main {
|
||||||
printVersionInformation();
|
printVersionInformation();
|
||||||
} else if (userData.length == 0) {
|
} else if (userData.length == 0) {
|
||||||
switch (applicationOutputLanguage) {
|
switch (applicationOutputLanguage) {
|
||||||
case GlobalConf.langGerman -> System.err.println("FATAL: Es wurde exact ein nicht-flag Argument erwartet. (" + userData.length + " erhalten)");
|
case GlobalConf.langGerman -> System.err.println("FATAL: " +
|
||||||
default -> System.err.println("FATAL: Expected one non-flag argument. (Got " + userData.length + ")");
|
"Es wurde keine Uhrzeit angegeben.");
|
||||||
|
default -> System.err.println("FATAL: No target time was " +
|
||||||
|
"provided.");
|
||||||
}
|
}
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
} else if (userData.length > 1) {
|
} else if (userData.length > 1) {
|
||||||
switch (applicationOutputLanguage) {
|
switch (applicationOutputLanguage) {
|
||||||
case GlobalConf.langGerman -> System.err.println("FATAL: " +
|
case GlobalConf.langGerman -> System.err.println("FATAL: " +
|
||||||
"Es wurde exact ein nicht-flag Argument erwartet. (" + userData.length + " erhalten)");
|
"Zu viele Argumente wurden angegeben.");
|
||||||
default -> System.err.println("FATAL: Expected one " +
|
default -> System.err.println("FATAL: Too many arguments " +
|
||||||
"non-flag argument. (Got " + userData.length + ")");
|
"provided.");
|
||||||
}
|
}
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue