# `MpxjEx.Error`
[🔗](https://github.com/rocket4ce/mpxj_ex/blob/v0.1.0/lib/mpxj_ex/error.ex#L1)

Returned (or raised by the `!` functions) when a file can't be read or converted.

The `:reason` field is one of:

  * `:file_not_found` - the input file doesn't exist
  * `:unsupported_format` - MPXJ doesn't recognise the file
  * `:password_protected` - the file is password protected
  * `:invalid_argument` - an option has an invalid value
  * `:java_not_found` - no `java` executable could be found
  * `:not_installed` - MPXJ isn't installed and `auto_install` is disabled
  * `:install_failed` - MPXJ couldn't be downloaded
  * `:out_of_memory` - the JVM ran out of memory (see the `:max_memory` option)
  * `:conversion_failed` - MPXJ failed while reading or writing the file
  * `:timeout` - a request to `MpxjEx.Server` took longer than `:timeout`
  * `:jvm_crashed` - the `MpxjEx.Server` JVM exited while handling the request

# `reason`

```elixir
@type reason() ::
  :file_not_found
  | :unsupported_format
  | :password_protected
  | :invalid_argument
  | :java_not_found
  | :not_installed
  | :install_failed
  | :out_of_memory
  | :conversion_failed
  | :timeout
  | :jvm_crashed
```

# `t`

```elixir
@type t() :: %MpxjEx.Error{__exception__: true, message: String.t(), reason: reason()}
```

---

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