Open
Description
Description
The and
function seems to only raise errors for the first async proc.
import std/asyncdispatch
proc ok {.async.} =
discard
proc err {.async.} =
raise newException(ValueError, "err")
proc main {.async.} =
try:
await ok() and err()
except ValueError:
echo "err1"
try:
await err() and ok()
except ValueError:
echo "err2"
try:
await ok() and ok() and err()
except ValueError:
echo "err3"
waitFor main()
Nim Version
Nim Compiler Version 2.1.1 [Linux: amd64]
Compiled at 2024-05-11
Copyright (c) 2006-2024 by Andreas Rumpf
git hash: c91b33a
active boot switches: -d:release
Current Output
err2
Expected Output
err1
err2
err3
Possible Solution
No response
Additional Information
No response