texception.nim 236 B

1234567891011121314
  1. proc someFunc() =
  2. try:
  3. raise newException(ValueError, "message")
  4. except ValueError as err:
  5. doAssert err.name == "ValueError"
  6. doAssert err.msg == "message"
  7. raise
  8. static:
  9. try:
  10. someFunc()
  11. except:
  12. discard