mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Implement close for DbusManagerImpl
This commit is contained in:
parent
fa9401d186
commit
510dc89e92
2 changed files with 21 additions and 10 deletions
|
@ -344,11 +344,11 @@ public class App {
|
|||
Command command, Signal ts, DBusConnection dBusConn, OutputWriter outputWriter
|
||||
) throws CommandException {
|
||||
if (command instanceof LocalCommand localCommand) {
|
||||
try {
|
||||
localCommand.handleCommand(ns, new DbusManagerImpl(ts, dBusConn), outputWriter);
|
||||
try (final var m = new DbusManagerImpl(ts, dBusConn)) {
|
||||
localCommand.handleCommand(ns, m, outputWriter);
|
||||
} catch (UnsupportedOperationException e) {
|
||||
throw new UserErrorException("Command is not yet implemented via dbus", e);
|
||||
} catch (DBusExecutionException e) {
|
||||
} catch (IOException | DBusExecutionException e) {
|
||||
throw new UnexpectedErrorException(e.getMessage(), e);
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue