MpxjEx.Error exception (MpxjEx v0.1.0)

Copy Markdown View Source

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

Summary

Types

reason()

@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()

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