summary refs log tree commit diff stats
path: root/tests/effects/teffects7.nim
blob: 73865b18db308f5ecfa54ff619ee27cf4c7db1f7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
discard """
  errormsg: "can raise an unlisted exception: ref ValueError"
  line: 10
"""

proc foo() {.raises: [].} =
  try:
    discard
  except KeyError:
    raise newException(ValueError, "foo")
  except Exception:
    discard

foo()