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

Small RFC. Minimal stacktrace for Exceptions when frames are disabled #9434

cooldome opened this issue Oct 18, 2018 · 2 comments


None yet
4 participants
Copy link

commented Oct 18, 2018

Nim exceptions have wonderful stack traces in debug mode, but there is none in the release mode. While it is possible to enable stack traces in release mode, they quite pricey in terms of performance. Therefore I want to propose something more lightweight for release build when frames are disabled.

When frames are disabled: report just one level of stack trace. Idea is to fill in one StackTraceEntry object for Exception using lineinfo of the raise statement itself. This is definitely possible with minor changes to the codegen and might even possible to achieve with system library changes only.

I will implement it if there is no clear objects.

@andreaferretti andreaferretti added the RFC label Oct 19, 2018


This comment has been minimized.

Copy link

commented Oct 19, 2018

Ok, go for it.


This comment has been minimized.

Copy link

commented Oct 19, 2018

Sounds beautiful.

cooldome added a commit to cooldome/Nim that referenced this issue Oct 23, 2018

@Araq Araq closed this in dfb8730 Oct 28, 2018

ianmcxa added a commit to ianmcxa/Nim that referenced this issue Oct 30, 2018

narimiran added a commit to narimiran/Nim that referenced this issue Oct 31, 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.