From f466538a3527cd539c732d3abee481fa7a34fc2f Mon Sep 17 00:00:00 2001 From: Sebastian Reichel Date: Thu, 28 Jun 2018 01:03:02 +0200 Subject: all: Add DBusError to avoid warnings with valac 0.40 --- src/cli/main.vala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/cli/main.vala') diff --git a/src/cli/main.vala b/src/cli/main.vala index a3208dd..377efa1 100644 --- a/src/cli/main.vala +++ b/src/cli/main.vala @@ -42,7 +42,11 @@ public static int main(string[] args) { void on_name_aquired() { foreach (string cmd in commands) { - cli.send(cmd); + try { + cli.send(cmd); + } catch (Error e) { + stderr.printf("Error sending command: %s", e.message); + } } // wait a minimal amount of time, to ensure the event was sent @@ -62,4 +66,4 @@ void on_bus_aquired(DBusConnection con) { stderr.printf("Could not register service\n"); } -} \ No newline at end of file +} -- cgit v1.2.3