kvstore: remove unnecessary EH (#592)

This commit is contained in:
Jacek Sieka 2023-02-22 10:03:13 +01:00 committed by GitHub
parent ca1c205441
commit 72c9858927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 12 additions and 16 deletions

View File

@ -664,7 +664,6 @@ proc customScalarBlobFunction(ctx: ptr sqlite3_context, n: cint, v: ptr ptr sqli
toOpenArray(blob2, 0, blob2Len - 1)
)
try:
if s.isOk():
let bytes = s.unsafeGet()
# try is necessary as otherwise nim marks SQLITE_TRANSIENT as throwing
@ -678,9 +677,6 @@ proc customScalarBlobFunction(ctx: ptr sqlite3_context, n: cint, v: ptr ptr sqli
let errMsg = s.error
sqlite3_result_error(ctx, errMsg, -1)
except Exception as e:
raiseAssert(e.msg)
proc registerCustomScalarFunction*(db: SqStoreRef, name: string, fun: CustomFunction): KvResult[void] =
## Register custom function inside sqlite engine. Registered function can
## be used in further queries by its name. Function should be side-effect