ttryexceptnewsyntax.nim 164 B

1234567891011121314
  1. discard """
  2. output: '''hello'''
  3. """
  4. type
  5. MyException = ref Exception
  6. #bug #5986
  7. try:
  8. raise MyException(msg: "hello")
  9. except MyException as e:
  10. echo e.msg