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

Enhancing IndexError #10746

Open
didactic-drunk opened this issue May 26, 2021 · 1 comment
Open

Enhancing IndexError #10746

didactic-drunk opened this issue May 26, 2021 · 1 comment

Comments

@didactic-drunk
Copy link
Contributor

didactic-drunk commented May 26, 2021

Feature Request

Problem

Index out of bounds (IndexError)
  from /usr/share/crystal/src/slice.cr:229:28 in '[]'

The error didn't give me information about what's wrong. Was the offset too large? The Slice empty? Position wrong? Every time I have to perform the same steps: Add logging and lose 15m of my life.

Feature

Log start, count(wnen available) and size with IndexError all/one/some of [all the time, only with debugging, as a feature flag, not in --release, other]

I prefer this on by default and if performance degrades off in --release by default but would need a flag to leave on.

I'd be happy to issue a PR but not without design approval.

@Blacksmoke16
Copy link
Member

Related: #9264.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants