Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display_error should call latest showerror, pt 2 #20497

Merged
merged 2 commits into from
Feb 14, 2017
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion base/client.jl
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,8 @@ function _start()
end
end
catch err
display_error(err,catch_backtrace())
eval(Main, Expr(:body, Expr(:return, Expr(:call, Base.display_error,
QuoteNode(err), catch_backtrace()))))
exit(1)
end
if is_interactive && have_color
Expand Down
8 changes: 8 additions & 0 deletions test/spawn.jl
Original file line number Diff line number Diff line change
Expand Up @@ -458,3 +458,11 @@ end

# readlines(::Cmd), accidentally broken in #20203
@test sort(readlines(`$lscmd -A`)) == sort(readdir())

# issue #19864 (PR #20497)
@test readchomp(pipeline(ignorestatus(
`$exename --startup-file=no -e '
struct Error19864 <: Exception; end
Base.showerror(io::IO, e::Error19864) = print(io, "correct19864")
throw(Error19864())'`),
stderr=catcmd)) == "ERROR: correct19864"