Skip to content

Commit e0ff13c

Browse files
committed
revert error msg in SystemError
1 parent 3d92e56 commit e0ff13c

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

base/loading.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,9 +2059,9 @@ function _include_dependency(mod::Module, _path::AbstractString; track_content=t
20592059
end
20602060
if !_track_dependencies[]
20612061
if !path_may_be_dir && !isfile(path)
2062-
throw(SystemError("including file $(repr(path))", Libc.ENOENT))
2062+
throw(SystemError("opening file $(repr(path))", Libc.ENOENT))
20632063
elseif path_may_be_dir && !Filesystem.isreadable(path)
2064-
throw(SystemError("including file or folder $(repr(path))", Libc.ENOENT))
2064+
throw(SystemError("opening file or folder $(repr(path))", Libc.ENOENT))
20652065
end
20662066
else
20672067
@lock require_lock begin

test/loading.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ end
652652
exc = try; include("./notarealfile.jl"); "unexpectedly reached!"; catch exc; exc; end
653653
@test exc isa SystemError
654654
exc.prefix
655-
end == "including file $(repr(joinpath(@__DIR__, "notarealfile.jl")))"
655+
end == "opening file $(repr(joinpath(@__DIR__, "notarealfile.jl")))"
656656

657657
old_act_proj = Base.ACTIVE_PROJECT[]
658658
pushfirst!(LOAD_PATH, "@")
@@ -1549,7 +1549,7 @@ end
15491549
end
15501550

15511551
file = joinpath(depot, "dev", "non-existent.jl")
1552-
@test_throws SystemError("including file $(repr(file))") include(file)
1552+
@test_throws SystemError("opening file $(repr(file))") include(file)
15531553
touch(file)
15541554
@test include_dependency(file) === nothing
15551555
chmod(file, 0x000)
@@ -1559,7 +1559,7 @@ end
15591559
@test include_dependency(dir) === nothing
15601560
dir
15611561
end
1562-
@test_throws SystemError("including file or folder $(repr(dir))") include_dependency(dir)
1562+
@test_throws SystemError("opening file or folder $(repr(dir))") include_dependency(dir)
15631563
end
15641564
end
15651565

0 commit comments

Comments
 (0)