blob: adf66de6812382f702998df77ed2084eedb4e016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
package io.dico.dicore.command;
public class CommandException extends Exception {
public CommandException() {
}
public CommandException(String message) {
super(message);
}
public CommandException(String message, Throwable cause) {
super(message, cause);
}
public CommandException(Throwable cause) {
super(cause);
}
public static CommandException missingArgument(String parameterName) {
return new CommandException("Missing argument for " + parameterName);
}
public static CommandException invalidArgument(String parameterName, String syntaxHelp) {
return new CommandException("Invalid input for " + parameterName + ", should be " + syntaxHelp);
}
}
|