Skip to content

Commit

Permalink
remove very old error hint from using .data field on a String (Juli…
Browse files Browse the repository at this point in the history
…aLang#52737)

This field was removed 7 years ago. I think it is fine to not special
case it any longer.
  • Loading branch information
KristofferC committed Jan 5, 2024
1 parent 3a02053 commit 67e6127
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions base/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,7 @@ showerror(io::IO, ::DivideError) = print(io, "DivideError: integer division erro
showerror(io::IO, ::StackOverflowError) = print(io, "StackOverflowError:")
showerror(io::IO, ::UndefRefError) = print(io, "UndefRefError: access to undefined reference")
showerror(io::IO, ::EOFError) = print(io, "EOFError: read end of file")
function showerror(io::IO, ex::ErrorException)
print(io, ex.msg)
if ex.msg == "type String has no field data"
println(io)
print(io, "Use `codeunits(str)` instead.")
end
end
showerror(io::IO, ex::ErrorException) = print(io, ex.msg)
showerror(io::IO, ex::KeyError) = (print(io, "KeyError: key ");
show(io, ex.key);
print(io, " not found"))
Expand Down

0 comments on commit 67e6127

Please sign in to comment.