t12223.nim 266 B

1234567891011121314151617181920
  1. discard """
  2. action: "run"
  3. output: '''
  4. caught
  5. index out of bounds, the container is empty
  6. '''
  7. """
  8. proc fun() =
  9. var z: seq[string]
  10. discard z[4]
  11. proc main()=
  12. try:
  13. fun()
  14. except Exception as e:
  15. echo "caught"
  16. echo getCurrentExceptionMsg()
  17. main()