-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
InexactError shows Inf16
as Inf
#51087
Comments
Hello , sir I will like to help for this issue , will you please provide with some hints for how to resolve this error message |
Thanks! I think the error is in the function function showerror(io::IO, ex::InexactError)
print(io, "InexactError: ", ex.func, '(')
nameof(ex.T) === ex.func || print(io, ex.T, ", ")
print(io, ex.val, ')')
Experimental.show_error_hints(io, ex)
end defined in base/errorshow.jl So if you can find a different implementation of the function that shows Inf16 as Inf16, that would fix it. You could try redefining the function in a repl with julia> function Base.showerror(io::IO, ex::InexactError)
print(io, "something new")
end
julia> UInt128(Inf16)
ERROR: something new
[...] to get it to preserve the type information. I suspect calling a different show method (e.g. show instead of print) might work. |
Thank you sir ! |
you could replace
|
@LilithHafner @longemen3000 Sir I guess the code provided above got changed a bit , so what next can be done Line 178 in 8d4d641
|
Hi, if this is still open, I can attempt it too Edit: Ah, nvm, looks like it's been resolved (am new to open-source) |
This has not yet been resolved. In general, we try to mark all resolved issues as closed and all unresolved issues as open. |
I think i have a solution. I opened a PR #52317 |
Resolves #51087 Closes #51163 Use `show` as pointed out in #51163 (comment).
This is slightly misleading:
The 16 is lost is here:
https://github.com/JuliaLang/julia/blob/b4052a5fa5af2c006612c962d6cf26808575c01b/base/errorshow.jl#L177C5-L177C27
The text was updated successfully, but these errors were encountered: