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/serial-device/main.vala | 2 ++ src/serial-device/serial-device.vala | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src/serial-device') diff --git a/src/serial-device/main.vala b/src/serial-device/main.vala index 70d50e2..d8dadf3 100644 --- a/src/serial-device/main.vala +++ b/src/serial-device/main.vala @@ -23,6 +23,8 @@ public static int main(string[] args) { error("IOError: %s\n", e.message); } catch(KeyFileError e) { error("Config Error: %s\n", e.message); + } catch(DBusError e) { + error("DBus Error: %s\n", e.message); } Bus.own_name( diff --git a/src/serial-device/serial-device.vala b/src/serial-device/serial-device.vala index 549cd74..ae7480b 100644 --- a/src/serial-device/serial-device.vala +++ b/src/serial-device/serial-device.vala @@ -272,7 +272,7 @@ public class Device { /** * @param duration duration of the blink in 0.1 seconds */ - public void blink(uint duration) { + public void blink(uint duration) throws IOError, DBusError { uint size = (byterate/1000) * duration; var msg = new uint8[size]; Posix.memset(msg, 0xFF, msg.length); -- cgit v1.2.3