Files
Nim/tests/exception/tsetexceptions.nim
flywind c2e3dc0ed1 close #18129 Add setCurrentException for JS backend (#18145)
* [std/re] make interface consistent

* tiny

* revert

* close #18129  add setCurrentException

* changelog entry
2021-06-01 18:16:25 +02:00

9 lines
198 B
Nim

discard """
targets: "c cpp js"
"""
let ex = newException(CatchableError, "test")
setCurrentException(ex)
doAssert getCurrentException().msg == ex.msg
doAssert getCurrentExceptionMsg() == ex.msg