Return err from modify fn
This commit is contained in:
parent
f41bd9528e
commit
a62c91bb6b
|
@ -54,7 +54,7 @@ method modifyGet*(self: SQLiteDatastore, key: Key, fn: ModifyGet): Future[?!seq[
|
|||
try:
|
||||
(maybeNewData, aux) = await fn(maybeCurrentData)
|
||||
except CatchableError as err:
|
||||
return failure("Error running modify function: " & err.msg)
|
||||
return failure(err)
|
||||
|
||||
if maybeCurrentData == maybeNewData:
|
||||
# no need to change currently stored value
|
||||
|
|
Loading…
Reference in New Issue