Skip to content

Commit

Permalink
error message: include string RequestError (#194)
Browse files Browse the repository at this point in the history
This is done in the example in `Base.showerror`: https://github.com/JuliaLang/julia/blob/2049baaf31edc75c4403177e21bb1c3be49fb683/base/errorshow.jl#L16

It would've been helpful for JuliaCloud/AWS.jl#541 to understand what kind of error it is. E.g. if it's a RequestError, then it's already being retried and we must've hit the retry limit; if it wasn't a RequestError, it was likely uncaught and therefore we'd be missing a retry.
  • Loading branch information
ericphanson authored May 11, 2022
1 parent 9f738d3 commit 20e0990
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Downloads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ struct RequestError <: Exception
end

function Base.showerror(io::IO, err::RequestError)
print(io, "$(error_message(err)) while requesting $(err.url)")
print(io, "RequestError: $(error_message(err)) while requesting $(err.url)")
end

function error_message(err::RequestError)
Expand Down

0 comments on commit 20e0990

Please sign in to comment.