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

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

foo()