Created
May 6, 2019 11:58
-
-
Save jrfondren/aa3163e33ebe8a3d3fc4be01b8adcaf8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
iterator abc: int = | |
defer: | |
echo "abc cleanup" | |
yield 1 | |
yield 2 | |
yield 3 | |
for x in abc(): | |
echo x | |
if x == 2: | |
raise newException(ValueError, "don't know how to count to 'many'") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 | |
2 | |
abc cleanup | |
itertest.nim(11) itertest | |
Error: unhandled exception: don't know how to count to 'many' [ValueError] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment