-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Conversation
The |
|
Hmm, seems like I'm misunderstanding what I only tested that short |
Because you are allowed (though not recommended) to throw an special AST object. |
I really wish we had |
Yeah, I hereby withdraw my objection to adding |
de54120
to
3eaf4d1
Compare
test/spawn.jl
Outdated
@@ -458,3 +458,7 @@ 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 "type Error19864 <: Exception; end; Base.showerror(io::IO, e::Error19864) = print(io, \"correct19864\"); throw(Error19864())"`), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can wrap inside the -e
code
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should also use struct
now
f5a7f72
to
92cc55a
Compare
Rebased, added test and addressed review comments. |
Ref https://discourse.julialang.org/t/custom-showerror-doesnt-always-trigger/1937 #19916 #19864
Does this warrant a test that spawns a new Julia process? Can't replicate it otherwise.
Also, @stevengj, is there a reason you used the following syntax:
while
eval(Expr(:call, display_error, errio, val, bt))
seems to work as well?