mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
fixes #1888
This commit is contained in:
17
tests/cpp/tcppraise.nim
Normal file
17
tests/cpp/tcppraise.nim
Normal file
@@ -0,0 +1,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"
|
||||
Reference in New Issue
Block a user