Propagate CancelledError

This commit is contained in:
Arnaud 2025-02-25 13:52:37 +01:00 committed by Giuliano Mega
parent 92f9533c7d
commit d583647c5b
2 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,8 @@ proc defaultModifyGetImpl*(
try:
(maybeNewData, aux) = await fn(maybeCurrentData)
except CancelledError as err:
raise err
except CatchableError as err:
return failure(err)

View File

@ -62,6 +62,8 @@ method modifyGet*(self: SQLiteDatastore, key: Key, fn: ModifyGet): Future[?!seq[
try:
(maybeNewData, aux) = await fn(maybeCurrentData)
except CancelledError as err:
raise err
except CatchableError as err:
return failure(err)