Code.LoadError exception (Elixir v1.19.0-dev)

View Source

An exception raised when a file cannot be loaded.

This is typically raised by functions in the Code module, for example:

iex> Code.require_file("missing_file.exs")
** (Code.LoadError) could not load missing_file.exs. Reason: enoent

The following fields of this exception are public and can be accessed freely:

  • :file (String.t/0) - the file name
  • :reason (term/0) - the reason why the file could not be loaded