Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

try statements and exceptions do not cooperate well #96

dom96 opened this issue Jan 21, 2012 · 0 comments


None yet
2 participants
Copy link

commented Jan 21, 2012

The following code gives an odd traceback, which makes debugging quite hard:

proc t(): bool =
  result = false
  var s: seq[int] = @[0,1,2,3,4,5,6,7,8,9]
  for i in 0..10:

while true:
    assert t()
  except EOS:

The try ... except statement seems to hide the information even more, because removing it seems to make the traceback a bit more understandable. The traceback that I get with the code above is:

Traceback (most recent call last)
system.nim(2100)         crappytb
Error: unhandled exception: index out of bounds [EInvalidIndex]

@Araq Araq closed this in 9aa81bf Jan 29, 2012

reactormonk pushed a commit to reactormonk/nim that referenced this issue Apr 7, 2014

Araq added a commit that referenced this issue Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.