Skip to content

Commit 4778f17

Browse files
committed
Ensure the backtrace is shown even if we can't show method candidates
1 parent d385e3e commit 4778f17

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

base/replutil.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,11 @@ function showerror(io::IO, ex::MethodError)
205205
print(io, "This may have arisen from a call to the constructor $construct_type(...),",
206206
"\nsince type constructors fall back to convert methods.")
207207
end
208-
show_method_candidates(io, ex)
208+
try
209+
show_method_candidates(io, ex)
210+
catch
211+
warn("Unable to show method candidates")
212+
end
209213
end
210214

211215
#Show an error by directly calling jl_printf.

0 commit comments

Comments
 (0)