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

Enhance StringIndexError display (correct escaping) #46039

Merged
merged 2 commits into from
Aug 30, 2022
Merged

Enhance StringIndexError display (correct escaping) #46039

merged 2 commits into from
Aug 30, 2022

Conversation

Rratic
Copy link
Contributor

@Rratic Rratic commented Jul 14, 2022

before

julia> "α\n"[2]
ERROR: StringIndexError: invalid index [2], valid nearby indices [1]=>'α', [3]=>'
'
Stacktrace:

after

julia> "α\n"[2]
ERROR: StringIndexError: invalid index [2], valid nearby indices [1]=>'α', [3]=>'\n'
Stacktrace:

@fredrikekre
Copy link
Member

Thanks for the contribution, can you also add a test for the error message?

@Rratic
Copy link
Contributor Author

Rratic commented Jul 14, 2022

Done (I guess so)

@Rratic
Copy link
Contributor Author

Rratic commented Jul 15, 2022

Guys, that test passed but a test in regex failed. (not related to this)
Shall this be merged and then we fix the regex test?

MethodError: no method matching hash(::Regex, ::UInt64)

@fredrikekre

@oscardssmith oscardssmith added the domain:error messages Better, more actionable error messages label Jul 15, 2022
@DilumAluthge
Copy link
Member

The regex test has been fixed on master, so I've rebased this.

I think this PR still has a failure in the deprecation test set that needs to be fixed before merging.

@giordano giordano mentioned this pull request Jul 16, 2022
@DilumAluthge DilumAluthge changed the title enhance StringIndexError display Enhance StringIndexError display (correct escaping) Jul 16, 2022
@Rratic
Copy link
Contributor Author

Rratic commented Jul 16, 2022

RequestError: HTTP/2 200 (Operation too slow. Less than 1 bytes/sec transferred the last 20 seconds) while requesting https://httpbingo.org/drip

@KristofferC KristofferC merged commit 1715110 into JuliaLang:master Aug 30, 2022
@KristofferC KristofferC added the backport 1.8 Change should be backported to release-1.8 label Aug 30, 2022
KristofferC pushed a commit that referenced this pull request Aug 30, 2022
@Rratic Rratic deleted the patch-1 branch September 2, 2022 13:39
@KristofferC KristofferC removed the backport 1.8 Change should be backported to release-1.8 label Sep 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:error messages Better, more actionable error messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants