summary refs log blame commit diff stats
path: root/tests/cpp/tcppraise.nim
blob: a9ea8e6ce3df930d2bbe6a1c45e29f98beca405a (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
















                                                            
discard """
  cmd: "nim cpp $file"
  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"