mirror of
https://github.com/aljazceru/signal-cli.git
synced 2025-12-18 22:54:20 +01:00
Add CommandException to abstract cli return codes for errors
This commit is contained in:
@@ -2,16 +2,17 @@ package org.asamk.signal.commands;
|
||||
|
||||
import net.sourceforge.argparse4j.inf.Namespace;
|
||||
|
||||
import org.asamk.signal.commands.exceptions.CommandException;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MultiLocalCommand extends LocalCommand {
|
||||
|
||||
int handleCommand(Namespace ns, List<Manager> m);
|
||||
void handleCommand(Namespace ns, List<Manager> m) throws CommandException;
|
||||
|
||||
@Override
|
||||
default int handleCommand(final Namespace ns, final Manager m) {
|
||||
return handleCommand(ns, List.of(m));
|
||||
default void handleCommand(final Namespace ns, final Manager m) throws CommandException {
|
||||
handleCommand(ns, List.of(m));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user