Refine the async tracebacks.
This commit is contained in:
parent
f73015ad9e
commit
9ca6afe73a
2 changed files with 41 additions and 12 deletions
|
|
@ -1,6 +1,13 @@
|
|||
discard """
|
||||
exitcode: 0
|
||||
output: ""
|
||||
output: '''
|
||||
b failure
|
||||
Async traceback:
|
||||
tasync_traceback.nim(49) tasync_traceback
|
||||
tasync_traceback.nim(47) a
|
||||
tasync_traceback.nim(44) b
|
||||
Exception message: b failure
|
||||
Exception type:'''
|
||||
"""
|
||||
import asyncdispatch
|
||||
|
||||
|
|
@ -40,7 +47,7 @@ proc a(): Future[int] {.async.} =
|
|||
return await b()
|
||||
|
||||
let aFut = a()
|
||||
# try:
|
||||
discard waitFor aFut
|
||||
# except Exception as exc:
|
||||
# echo exc.msg
|
||||
try:
|
||||
discard waitFor aFut
|
||||
except Exception as exc:
|
||||
echo exc.msg
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue