Readded exceptions without context, useful for exceptions during execution
This commit is contained in:
@@ -39,6 +39,10 @@ public class ParameterizedCommandExceptionType implements CommandExceptionType {
|
||||
return result.toString();
|
||||
}
|
||||
|
||||
public CommandException create(final Object... values) {
|
||||
return new CommandException(this, createMap(values));
|
||||
}
|
||||
|
||||
public CommandException createWithContext(final ImmutableStringReader reader, final Object... values) {
|
||||
return new CommandException(this, createMap(values), reader.getString(), reader.getCursor());
|
||||
}
|
||||
|
||||
@@ -25,6 +25,10 @@ public class SimpleCommandExceptionType implements CommandExceptionType {
|
||||
return message;
|
||||
}
|
||||
|
||||
public CommandException create() {
|
||||
return new CommandException(this, ImmutableMap.of());
|
||||
}
|
||||
|
||||
public CommandException createWithContext(final ImmutableStringReader reader) {
|
||||
return new CommandException(this, ImmutableMap.of(), reader.getString(), reader.getCursor());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user