aboutsummaryrefslogtreecommitdiff
path: root/plugins/signal-protocol/vapi/signal-protocol-public.vapi
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-09-10 19:11:41 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-09-10 19:36:11 +0200
commitbd7fde99af3df59c5ec96184b2649b4308250b24 (patch)
tree49f67c73f6ecc69bb949ea81b49814c90a13f0bd /plugins/signal-protocol/vapi/signal-protocol-public.vapi
parentd5d305193ce527f1cc3022c406de35d9a85d4ccb (diff)
downloaddino-bd7fde99af3df59c5ec96184b2649b4308250b24.tar.gz
dino-bd7fde99af3df59c5ec96184b2649b4308250b24.zip
fixup Fix some warnings
Diffstat (limited to 'plugins/signal-protocol/vapi/signal-protocol-public.vapi')
-rw-r--r--plugins/signal-protocol/vapi/signal-protocol-public.vapi10
1 files changed, 4 insertions, 6 deletions
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();
}