t18620.nim 289 B

123456789101112131415161718
  1. discard """
  2. matrix: "--gc:arc; --gc:refc"
  3. """
  4. proc hello() =
  5. raise newException(ValueError, "You are wrong")
  6. var flag = false
  7. try:
  8. hello()
  9. except ValueError as e:
  10. flag = true
  11. doAssert len(getStackTraceEntries(e)) > 0
  12. doAssert len(getStackTraceEntries(e)) > 0
  13. doAssert flag