We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Code.LoadError
1 parent 6696133 commit ee561bdCopy full SHA for ee561bd
lib/elixir/lib/code.ex
@@ -463,7 +463,7 @@ defmodule Code do
463
if File.regular?(file) do
464
file
465
else
466
- raise LoadError, file: file
+ raise Code.LoadError, file: file
467
end
468
469
lib/elixir/test/elixir/code_test.exs
@@ -70,6 +70,10 @@ defmodule CodeTest do
70
71
test :eval_file do
72
assert Code.eval_file(fixture_path("code_sample.exs")) == {3, [var: 3]}
73
+
74
+ assert_raise Code.LoadError, fn ->
75
+ Code.eval_file("non_existent.exs")
76
+ end
77
78
79
test :require do
0 commit comments