do not re-raise CancelledError as convertError not used in async procs

This commit is contained in:
Eric 2025-03-11 17:53:38 +11:00
parent 2695b46dc4
commit 6057d5ac45
No known key found for this signature in database

View File

@ -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)