summary refs log tree commit diff stats
path: root/tests/exception/tsetexceptions.nim
blob: 0e353f43e83856e507bb43fda3b6ccbd76f8ef96 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
discard """
  targets: "c cpp js"
  joinable: false
"""

# refs https://github.com/nim-lang/Nim/pull/18247#issuecomment-860877161

let ex = newException(CatchableError, "test")
setCurrentException(ex)
doAssert getCurrentException().msg == ex.msg
doAssert getCurrentExceptionMsg() == ex.msg