mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 11:00:38 +00:00
Add CommandException to abstract cli return codes for errors
This commit is contained in:
parent
c6395b9f35
commit
221d937eec
47 changed files with 538 additions and 572 deletions
|
@ -3,14 +3,15 @@ package org.asamk.signal.commands;
|
|||
import net.sourceforge.argparse4j.inf.Namespace;
|
||||
|
||||
import org.asamk.Signal;
|
||||
import org.asamk.signal.commands.exceptions.CommandException;
|
||||
import org.asamk.signal.dbus.DbusSignalImpl;
|
||||
import org.asamk.signal.manager.Manager;
|
||||
|
||||
public interface DbusCommand extends LocalCommand {
|
||||
|
||||
int handleCommand(Namespace ns, Signal signal);
|
||||
void handleCommand(Namespace ns, Signal signal) throws CommandException;
|
||||
|
||||
default int handleCommand(final Namespace ns, final Manager m) {
|
||||
return handleCommand(ns, new DbusSignalImpl(m));
|
||||
default void handleCommand(final Namespace ns, final Manager m) throws CommandException {
|
||||
handleCommand(ns, new DbusSignalImpl(m));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue