-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Error: can raise an unlisted exception #19
Comments
Yeah, exception handling seems to have been improved a bit since 0.13.1 and detects things it didn't when I wrote the code :). I'll fix it tomorrow. Also, this indicates NimYAML needs more tests. |
This is an interesting one. I do not see how the source line the compiler complains about can raise this exception, and I also cannot wrap it with try/catch - the compiler still complains. Accessing table keys is done with the Might be a compiler regression, or something so subtle I did not find it yet. I do not want to lose the guarantee |
This was one badass bug. |
Apparently, this arises when trying to serialize anything that contains a table. A small example would be
It seems that this happens because
representChild
is explicit defined not to raise exceptions, but accessing table keys can raiseKeyError
.I think one should either catch that exception, or remove the explicit pragma
{. raises: [] .}
and let the compiler infer effectsThe text was updated successfully, but these errors were encountered: