Skip to content

Commit

Permalink
Merge pull request #20497 from JuliaLang/tb/display_error
Browse files Browse the repository at this point in the history
 display_error should call latest showerror, pt 2
  • Loading branch information
maleadt authored Feb 14, 2017
2 parents c72dbdf + 92cc55a commit cfbad5f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
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"

0 comments on commit cfbad5f

Please sign in to comment.