t7224.nim 373 B

12345678910111213141516171819202122232425262728
  1. discard """
  2. cmd: "nim $target $options --stackTrace:on --lineTrace:on $file"
  3. outputsub: '''
  4. t7224.aaa, line: 21
  5. t7224.bbb, line: 18
  6. t7224.ccc, line: 15
  7. t7224.ddd, line: 12
  8. '''
  9. """
  10. proc ddd() =
  11. raise newException(IOError, "didn't do stuff")
  12. proc ccc() =
  13. ddd()
  14. proc bbb() =
  15. ccc()
  16. proc aaa() =
  17. bbb()
  18. try:
  19. aaa()
  20. except IOError as e:
  21. echo getStackTrace(e)