mirror of https://github.com/cabaletta/baritone
Don't swallow random exceptions, don't bother with CommandExceptions
This commit is contained in:
parent
b111fd2f3e
commit
f7a20a3acf
|
@ -373,6 +373,8 @@ public class ArgConsumer implements IArgConsumer {
|
|||
public <T extends IDatatype> Stream<String> tabCompleteDatatype(T datatype) {
|
||||
try {
|
||||
return datatype.tabComplete(this.context);
|
||||
} catch (CommandException ignored) {
|
||||
// NOP
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
|
|
@ -151,9 +151,12 @@ public class CommandManager implements ICommandManager {
|
|||
private Stream<String> tabComplete() {
|
||||
try {
|
||||
return this.command.tabComplete(this.label, this.args);
|
||||
} catch (CommandException ignored) {
|
||||
// NOP
|
||||
} catch (Throwable t) {
|
||||
return Stream.empty();
|
||||
t.printStackTrace();
|
||||
}
|
||||
return Stream.empty();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue