aboutsummaryrefslogtreecommitdiff
path: root/plugins/signal-protocol/vapi/signal-protocol-public.vapi
diff options
context:
space:
mode:
authorhrxi <hrrrxi@gmail.com>2019-09-01 18:18:25 +0200
committerfiaxh <fiaxh@users.noreply.github.com>2019-09-10 19:36:11 +0200
commitd5d305193ce527f1cc3022c406de35d9a85d4ccb (patch)
treed12efc741319a7d71c13f7bf6c2c7579d25fdabe /plugins/signal-protocol/vapi/signal-protocol-public.vapi
parent9950742bf1903291c271619aea101b0e2f81d19c (diff)
downloaddino-d5d305193ce527f1cc3022c406de35d9a85d4ccb.tar.gz
dino-d5d305193ce527f1cc3022c406de35d9a85d4ccb.zip
Fix some warnings
Instances of `RegexError` are just asserted as `assert_not_reached` as they cannot really fail except for allocation failure if the given regex is valid.
Diffstat (limited to 'plugins/signal-protocol/vapi/signal-protocol-public.vapi')
-rw-r--r--plugins/signal-protocol/vapi/signal-protocol-public.vapi16
1 files changed, 13 insertions, 3 deletions
diff --git a/plugins/signal-protocol/vapi/signal-protocol-public.vapi b/plugins/signal-protocol/vapi/signal-protocol-public.vapi
index 0a4456ad..1952beb1 100644
--- a/plugins/signal-protocol/vapi/signal-protocol-public.vapi
+++ b/plugins/signal-protocol/vapi/signal-protocol-public.vapi
@@ -218,9 +218,14 @@ namespace Signal {
[CCode (instance_pos = 1, cname = "ec_public_key_serialize")]
private int serialize_([CCode (pos = 0)] out Buffer buffer);
[CCode (cname = "ec_public_key_serialize_")]
- public uint8[] serialize() throws GLib.Error {
+ public uint8[] serialize() {
Buffer buffer;
- throw_by_code(serialize_(out buffer));
+ try {
+ throw_by_code(serialize_(out buffer));
+ } catch (GLib.Error e) {
+ // Can only throw for invalid arguments or out of memory.
+ GLib.assert_not_reached();
+ }
return buffer.data;
}
public int compare(ECPublicKey other);
@@ -235,7 +240,12 @@ namespace Signal {
[CCode (cname = "ec_private_key_serialize_")]
public uint8[] serialize() throws GLib.Error {
Buffer buffer;
- throw_by_code(serialize_(out buffer));
+ try {
+ throw_by_code(serialize_(out buffer));
+ } catch (GLib.Error e) {
+ // Can only throw for invalid arguments or out of memory.
+ GLib.assert_not_reached();
+ }
return buffer.data;
}
public int compare(ECPublicKey other);