tsetexceptions.nim 290 B

123456789101112
  1. discard """
  2. targets: "c cpp js"
  3. joinable: false
  4. """
  5. # refs https://github.com/nim-lang/Nim/pull/18247#issuecomment-860877161
  6. let ex = newException(CatchableError, "test")
  7. setCurrentException(ex)
  8. doAssert getCurrentException().msg == ex.msg
  9. doAssert getCurrentExceptionMsg() == ex.msg