mirror of
https://github.com/logos-storage/nim-datastore.git
synced 2026-01-02 13:43:11 +00:00
Adjusts exception handling in leveldbds to match what can be raised by leveldb iterator callbacks.
This commit is contained in:
parent
3ed00d666c
commit
ff1bf84794
@ -113,17 +113,9 @@ method query*(
|
||||
return success (key.some, valueStr.toBytes())
|
||||
except LevelDbException as e:
|
||||
return failure("LevelDbDatastore.query -> next exception: " & $e.msg)
|
||||
except Exception as e:
|
||||
return failure("Unknown exception in LevelDbDatastore.query -> next: " & $e.msg)
|
||||
|
||||
proc dispose(): Future[?!void] {.async.} =
|
||||
try:
|
||||
dbIter.dispose()
|
||||
return success()
|
||||
except LevelDbException as e:
|
||||
return failure("LevelDbDatastore.query -> dispose exception: " & $e.msg)
|
||||
except Exception as e:
|
||||
return failure("Unknown exception in LevelDbDatastore.query -> dispose: " & $e.msg)
|
||||
dbIter.dispose()
|
||||
return success()
|
||||
|
||||
iter.next = next
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user