Skip to content

Commit 35a186b

Browse files
Only print a single LoadError: prefix for nested LoadErrors during showerror (#38725)
* fold repeated `LoadError :` prints during showerror * Only print a single LoadError: prefix
1 parent 263451e commit 35a186b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/errorshow.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function showerror(io::IO, ex, bt; backtrace=true)
9292
end
9393

9494
function showerror(io::IO, ex::LoadError, bt; backtrace=true)
95-
print(io, "LoadError: ")
95+
!isa(ex.error, LoadError) && print(io, "LoadError: ")
9696
showerror(io, ex.error, bt, backtrace=backtrace)
9797
print(io, "\nin expression starting at $(ex.file):$(ex.line)")
9898
end

0 commit comments

Comments
 (0)