From e648b93c3102e1f25528f91a3400e0c2f38e6147 Mon Sep 17 00:00:00 2001 From: nitely Date: Sat, 28 Dec 2024 20:21:52 -0300 Subject: [PATCH] wip --- tests/async/tasync_error_tracking.nim | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/async/tasync_error_tracking.nim b/tests/async/tasync_error_tracking.nim index a6da226f0235..c15a41ce81d9 100644 --- a/tests/async/tasync_error_tracking.nim +++ b/tests/async/tasync_error_tracking.nim @@ -6,6 +6,18 @@ proc err(throw: bool) = if throw: raise newException(MyError, "myerr") +block: + proc bar() {.async.} = + err(false) + + proc foo() {.async.} = + await bar() + + proc main {.async, raises: [MyError].} = + await foo() + + waitFor main() + block: proc foo() {.async, raises: [MyError].} = err(false)