tnim_stacktrace_override.nim 359 B

12345678910111213141516171819
  1. discard """
  2. cmd: "nim c -d:nimStacktraceOverride $file"
  3. output: '''begin
  4. Traceback (most recent call last, using override)
  5. Error: unhandled exception: stack trace produced [ValueError]
  6. '''
  7. exitcode: 1
  8. """
  9. import asyncfutures
  10. proc main =
  11. echo "begin"
  12. if true:
  13. raise newException(ValueError, "stack trace produced")
  14. echo "unreachable"
  15. main()