summaryrefslogtreecommitdiffstats
path: root/src/serial-device
diff options
context:
space:
mode:
authorSebastian Reichel <sre@ring0.de>2018-06-28 01:03:02 +0200
committerSebastian Reichel <sre@ring0.de>2018-06-28 01:53:40 +0200
commitf466538a3527cd539c732d3abee481fa7a34fc2f (patch)
tree0a244c5b3594ee42d25744bdbdd3f0a44595c87b /src/serial-device
parentc70d626e473c8cbdbd87125a256ca221c0c3fa23 (diff)
downloadserial-barcode-scanner-f466538a3527cd539c732d3abee481fa7a34fc2f.tar.bz2
all: Add DBusError to avoid warnings with valac 0.40
Diffstat (limited to 'src/serial-device')
-rw-r--r--src/serial-device/main.vala2
-rw-r--r--src/serial-device/serial-device.vala2
2 files changed, 3 insertions, 1 deletions
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);