From bd7fde99af3df59c5ec96184b2649b4308250b24 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Tue, 10 Sep 2019 19:11:41 +0200 Subject: fixup Fix some warnings --- plugins/signal-protocol/vapi/signal-protocol-public.vapi | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'plugins/signal-protocol/vapi') diff --git a/plugins/signal-protocol/vapi/signal-protocol-public.vapi b/plugins/signal-protocol/vapi/signal-protocol-public.vapi index 1952beb1..40e85c7f 100644 --- a/plugins/signal-protocol/vapi/signal-protocol-public.vapi +++ b/plugins/signal-protocol/vapi/signal-protocol-public.vapi @@ -220,9 +220,8 @@ namespace Signal { [CCode (cname = "ec_public_key_serialize_")] public uint8[] serialize() { Buffer buffer; - try { - throw_by_code(serialize_(out buffer)); - } catch (GLib.Error e) { + int code = serialize_(out buffer); + if (code < 0 && code > MIN_ERROR_CODE) { // Can only throw for invalid arguments or out of memory. GLib.assert_not_reached(); } @@ -240,9 +239,8 @@ namespace Signal { [CCode (cname = "ec_private_key_serialize_")] public uint8[] serialize() throws GLib.Error { Buffer buffer; - try { - throw_by_code(serialize_(out buffer)); - } catch (GLib.Error e) { + int code = serialize_(out buffer); + if (code < 0 && code > MIN_ERROR_CODE) { // Can only throw for invalid arguments or out of memory. GLib.assert_not_reached(); } -- cgit v1.2.3-70-g09d2