mirror of
https://github.com/logos-storage/logos-storage-nim.git
synced 2026-01-05 15:03:07 +00:00
do not re-raise CancelledError as convertError not used in async procs
This commit is contained in:
parent
2695b46dc4
commit
6057d5ac45
@ -33,10 +33,9 @@ proc raiseCodexProcessError(
|
||||
raise newException(CodexProcessError, msg & ": " & parent.msg, parent)
|
||||
|
||||
template convertError(msg, body: typed) =
|
||||
# Don't use this in an async proc, unless body does not raise CancelledError
|
||||
try:
|
||||
body
|
||||
except CancelledError as e:
|
||||
raise e
|
||||
except CatchableError as parent:
|
||||
raiseCodexProcessError(msg, parent)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user