Skip to content

Commit 09e8109

Browse files
authored
Remove duplicate lines in print_stackframe (#49751)
These lines were apparently refactored into `print_module_path_file` but not removed from `print_stackframe`. Also moved the `fixup_stdlib_path` call because `file` isn't even used in the parent function.
1 parent 7157029 commit 09e8109

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

base/errorshow.jl

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -716,9 +716,6 @@ parentmodule_before_main(x) = parentmodule_before_main(parentmodule(x))
716716
# Print a stack frame where the module color is set manually with `modulecolor`.
717717
function print_stackframe(io, i, frame::StackFrame, n::Int, ndigits_max, modulecolor)
718718
file, line = string(frame.file), frame.line
719-
file = fixup_stdlib_path(file)
720-
stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
721-
stacktrace_contract_userdir() && (file = contractuser(file))
722719

723720
# Used by the REPL to make it possible to open
724721
# the location of a stackframe/method in the editor.
@@ -758,6 +755,7 @@ function print_module_path_file(io, modul, file, line; modulecolor = :light_blac
758755
end
759756

760757
# filepath
758+
file = fixup_stdlib_path(file)
761759
stacktrace_expand_basepaths() && (file = something(find_source_file(file), file))
762760
stacktrace_contract_userdir() && (file = contractuser(file))
763761
print(io, " ")

0 commit comments

Comments
 (0)