# `BeamPatch.ModuleLoadError`
[🔗](https://github.com/kzemek/beam_patch/blob/main/lib/beam_patch/error.ex#L144)

An error that is raised when a module cannot be loaded.

## Fields
- `:module` (`t:module/0`) - The module that couldn't be loaded.
- `:reason` (`:badarg` | `t::code.load_error_rsn/0`) - The reason for the error.

# `t`
[🔗](https://github.com/kzemek/beam_patch/blob/main/lib/beam_patch/error.ex#L154)

```elixir
@type t() :: %BeamPatch.ModuleLoadError{
  __exception__: true,
  module: module(),
  reason: :badarg | :code.load_error_rsn()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
