diff options
author | Daniil Yarancev <21169548+Yardanico@users.noreply.github.com> | 2018-06-05 21:25:45 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-05 21:25:45 +0300 |
commit | 642641359821b6a63c6cf7edaaa45873b7ea59c7 (patch) | |
tree | 627af3020528cb916b3174bd94304307ca875c77 /tests/cpp/tcppraise.nim | |
parent | fb44c522e6173528efa8035ecc459c84887d0167 (diff) | |
parent | 3cbc07ac7877b03c605498760fe198e3200cc197 (diff) | |
download | Nim-642641359821b6a63c6cf7edaaa45873b7ea59c7.tar.gz |
Merge pull request #2 from nim-lang/devel
Update
Diffstat (limited to 'tests/cpp/tcppraise.nim')
-rw-r--r-- | tests/cpp/tcppraise.nim | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tests/cpp/tcppraise.nim b/tests/cpp/tcppraise.nim index 7db9c0cfa..f359a2e8b 100644 --- a/tests/cpp/tcppraise.nim +++ b/tests/cpp/tcppraise.nim @@ -3,7 +3,9 @@ discard """ output: '''foo bar Need odd and >= 3 digits## -baz''' +baz +caught +''' """ # bug #1888 @@ -15,3 +17,21 @@ try: except ValueError: echo getCurrentExceptionMsg(), "##" echo "baz" + + +# bug 7232 +try: + discard +except KeyError, ValueError: + echo "except handler" # should not be invoked + + +#bug 7239 +try: + try: + raise newException(ValueError, "asdf") + except KeyError, ValueError: + raise +except: + echo "caught" + |