diff options
author | Sebastian Reichel <sre@ring0.de> | 2018-06-28 01:03:02 +0200 |
---|---|---|
committer | Sebastian Reichel <sre@ring0.de> | 2018-06-28 01:53:40 +0200 |
commit | f466538a3527cd539c732d3abee481fa7a34fc2f (patch) | |
tree | 0a244c5b3594ee42d25744bdbdd3f0a44595c87b /src/pdf-invoice/main.vala | |
parent | c70d626e473c8cbdbd87125a256ca221c0c3fa23 (diff) | |
download | serial-barcode-scanner-f466538a3527cd539c732d3abee481fa7a34fc2f.tar.bz2 |
all: Add DBusError to avoid warnings with valac 0.40
Diffstat (limited to 'src/pdf-invoice/main.vala')
-rw-r--r-- | src/pdf-invoice/main.vala | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pdf-invoice/main.vala b/src/pdf-invoice/main.vala index 3d8e298..dc95bde 100644 --- a/src/pdf-invoice/main.vala +++ b/src/pdf-invoice/main.vala @@ -19,6 +19,8 @@ public static int main(string[] args) { try { Config cfg = Bus.get_proxy_sync(BusType.SYSTEM, "io.mainframe.shopsystem.Config", "/io/mainframe/shopsystem/config"); datadir = cfg.get_string("INVOICE", "datadir"); + } catch(DBusError e) { + error("DBusError: %s\n", e.message); } catch(IOError e) { error("IOError: %s\n", e.message); } catch(KeyFileError e) { @@ -41,7 +43,7 @@ public static int main(string[] args) { void on_bus_aquired(DBusConnection conn) { try { conn.register_object("/io/mainframe/shopsystem/invoicepdf", new InvoicePDF(datadir)); - } catch(IOError e) { - stderr.printf("Could not register service\n"); + } catch(Error e) { + stderr.printf("Could not register service: %s\n", e.message); } } |