summary refs log tree commit diff stats
path: root/tests/cpp/tcppraise.nim
blob: 7db9c0cfa2c45ecd6ac79b0b37fed5f7e3a239fa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  targets: "cpp"
  output: '''foo
bar
Need odd and >= 3 digits##
baz'''
"""

# bug #1888
echo "foo"
try:
  echo "bar"
  raise newException(ValueError, "Need odd and >= 3 digits")
#  echo "baz"
except ValueError:
  echo getCurrentExceptionMsg(), "##"
echo "baz"