summary refs log tree commit diff stats
path: root/tests/async/tasynctry2.nim
blob: 444a058bebb406b66ce6c91235d8aeab90989e6c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
discard """
  file: "tasynctry2.nim"
  errormsg: "\'yield\' cannot be used within \'try\' in a non-inlined iterator"
  line: 15
"""
import asyncdispatch

proc foo(): Future[bool] {.async.} = discard

proc test5(): Future[int] {.async.} =
  try:
    discard await foo()
    raise newException(ValueError, "Test5")
  except:
    discard await foo()
    result = 0