Commit ddd4afb
Ricardo de Cillo
Improve error message for IEx.Helpers.r when module does not exist.
Before this commit, when trying to reload an unloaded module, the
user would see an error like:
iex(1)> r InexistentModule
** (UndefinedFunctionError) undefined function: InexistentModule.module_info/1
InexistentModule.module_info(:compile)
lib/iex/lib/iex/helpers.ex:352: IEx.Helpers.source/1
lib/iex/lib/iex/helpers.ex:311: IEx.Helpers.do_r/1
lib/iex/lib/iex/helpers.ex:304: IEx.Helpers.r/1
After this commit, the user should see
iex(1)> r InexistentModule
** (ArgumentError) Unloaded module Elixir.InexistentModule. Try loading the module's beam file with `IEx.Helpers.l\1`
lib/iex/lib/iex/helpers.ex:312: IEx.Helpers.do_r/1
lib/iex/lib/iex/helpers.ex:304: IEx.Helpers.r/1
Which is more informative.1 parent 99b1d9b commit ddd4afb
2 files changed
+5
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
311 | 315 | | |
312 | 316 | | |
313 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
308 | | - | |
| 308 | + | |
309 | 309 | | |
310 | 310 | | |
311 | 311 | | |
| |||
0 commit comments