Skip to content

tryparse should still throw an exception on invalid base #17333

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

Merged
merged 1 commit into from
Jul 9, 2016

Conversation

stevengj
Copy link
Member

@stevengj stevengj commented Jul 8, 2016

tryparse does not throw an exception on an invalid string, but it should still throw an ArgumentError if the base argument is invalid. This fixes a regression apparently introduced by #17078.

In particular, this regression has broken the Compat.jl tests (see e.g. JuliaLang/Compat.jl#245, JuliaLang/Compat.jl#240).

cc: @yuyichao, @quinnj

@stevengj stevengj added the regression Regression in behavior compared to a previous version label Jul 8, 2016
@stevengj
Copy link
Member Author

stevengj commented Jul 8, 2016

Oh grr, we need to distinguish the base passed by the user (which should throw) from the base extracted by parseint_preamble (which shouldn't throw).

@stevengj
Copy link
Member Author

stevengj commented Jul 8, 2016

Okay, should be fixed now, I hope.

@stevengj
Copy link
Member Author

stevengj commented Jul 8, 2016

AppVeyor failure in pkg test seems to be an unrelated network problem: GitError(Code:ERROR, Class:OS, Failed to receive response: The server returned an invalid or unrecognized response).

@quinnj
Copy link
Member

quinnj commented Jul 8, 2016

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Regression in behavior compared to a previous version
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants