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

Remove duplicate lines in print_stackframe #49751

Merged
merged 3 commits into from
Aug 14, 2023
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
4 changes: 1 addition & 3 deletions base/errorshow.jl
Original file line number Diff line number Diff line change
Expand Up @@ -705,9 +705,6 @@ parentmodule_before_main(x) = parentmodule_before_main(parentmodule(x))
# Print a stack frame where the module color is set manually with `modulecolor`.
function print_stackframe(io, i, frame::StackFrame, n::Int, ndigits_max, modulecolor)
file, line = string(frame.file), frame.line
file = fixup_stdlib_path(file)
stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
stacktrace_contract_userdir() && (file = contractuser(file))

# Used by the REPL to make it possible to open
# the location of a stackframe/method in the editor.
Expand Down Expand Up @@ -747,6 +744,7 @@ function print_module_path_file(io, modul, file, line; modulecolor = :light_blac
end

# filepath
file = fixup_stdlib_path(file)
stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
stacktrace_contract_userdir() && (file = contractuser(file))
print(io, " ")
Expand Down