Files
Nim/tests/exception/tsetexceptions.nim
2021-06-17 08:20:33 +02:00

12 lines
290 B
Nim

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