blob: b859952b50208c09919a8b2514bbb302e01b9f50 (
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);
}
}
|