Readded exceptions without context, useful for exceptions during execution
This commit is contained in:
parent
02f3a68ac0
commit
f287b89ee4
2 changed files with 8 additions and 0 deletions
|
@ -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());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue