aboutsummaryrefslogtreecommitdiff
path: root/plugins/signal-protocol
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/signal-protocol')
-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();
}