-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Only print a single LoadError:
prefix for nested LoadErrors during showerror
#38725
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
Only print a single LoadError:
prefix for nested LoadErrors during showerror
#38725
Conversation
LoadError :
prints during showerrorLoadError:
prints during showerror
Yeah, I see that. How about |
They're technically not module boundaries, but instead file boundaries (
If it's not imprecise, then |
Good point. How about just |
Or how about we just always show it as a single |
I think just one |
Yeah, I like that |
LoadError:
prints during showerrorLoadError:
prefix for nested LoadErrors during showerror
Requesting review from @JeffBezanson, primarily on the idea of just printing one |
Low priority bump |
Bump @JeffBezanson |
|
||
function showerror(io::IO, ex::LoadError, bt; backtrace=true) | ||
print(io, "LoadError: ") | ||
!isa(ex.error, LoadError) && print(io, "LoadError: ") |
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.
!isa(ex.error, LoadError) && print(io, "LoadError: ") |
I'm not even entirely sure that this part of the text is useful at all?
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.
True. I'd go with removing LoadError:
from the error show entirely if people agree. Or would that be considered to be a breaking change?
Given the approval I'm going to go with a |
…showerror (JuliaLang#38725) * fold repeated `LoadError :` prints during showerror * Only print a single LoadError: prefix
…showerror (JuliaLang#38725) * fold repeated `LoadError :` prints during showerror * Only print a single LoadError: prefix
…showerror (JuliaLang#38725) * fold repeated `LoadError :` prints during showerror * Only print a single LoadError: prefix
Edit: Updated to
(Original suggestion)
Folds repeated
LoadError:
prints intoLoadError (xN):
where N is the depth. Prints normally if depth is 1Before:
This PR: