From cf725062e997d61db92ac6ca234a151c70a035e8 Mon Sep 17 00:00:00 2001 From: kdeme Date: Tue, 5 Nov 2019 14:18:07 +0100 Subject: [PATCH] Using raises pragma with logging really makes no sense currently but okay... --- wrappers/libnimbus.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wrappers/libnimbus.nim b/wrappers/libnimbus.nim index 90585fa7c..e07ae3fe6 100644 --- a/wrappers/libnimbus.nim +++ b/wrappers/libnimbus.nim @@ -247,7 +247,7 @@ proc nimbus_new_keypair(): cstring {.exportc, raises: [].} = result = "" proc nimbus_add_keypair(privateKey: ptr byte): - cstring {.exportc, raises: [OSError, IOError].} = + cstring {.exportc, raises: [OSError, IOError, ValueError].} = ## It is important that the caller makes a copy of the returned cstring before ## doing any other API calls. This might not hold for all types of GC. doAssert(not privateKey.isNil, "Passed a null pointer as privateKey") @@ -270,7 +270,7 @@ proc nimbus_delete_keypair(id: cstring): bool {.exportc, raises: [].} = result = whisperKeys.asymKeys.take($id, unneeded) proc nimbus_get_private_key(id: cstring, privateKey: ptr PrivateKey): - bool {.exportc, raises: [OSError, IOError].} = + bool {.exportc, raises: [OSError, IOError, ValueError].} = doAssert(not id.isNil, "Key id cannot be nil") doAssert(not privateKey.isNil, "Passed a null pointer as privateKey")