Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion base/replutil.jl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ function showerror(io::IO, ex::MethodError)
print(io, "This may have arisen from a call to the constructor $construct_type(...),",
"\nsince type constructors fall back to convert methods.")
end
show_method_candidates(io, ex)
try
show_method_candidates(io, ex)
catch
warn("Unable to show method candidates")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be warn(io, ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure; wouldn't you want it to go to STDERR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of the output is going to io, seems odd to have part of it not. What about in IJulia, does this result in the warning going to the terminal that's running the kernel instead of the output cell?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, you're right. Especially since we're already in the middle of producing output for an error. Will fix.

end
end

#Show an error by directly calling jl_printf.
Expand Down