LangelicArchive.Error exception (langelic_archive v0.1.0)

Copy Markdown View Source

Error returned from LangelicArchive functions.

The kind field is an atom identifying the error class. The message field is a human-readable string suitable for logging.

Kinds

  • :unrecognized_format — the bytes are not a ZIP, RAR, or 7z archive
  • :encrypted — the archive (or an entry in it) requires a password
  • :corrupt — the archive is recognized but cannot be read
  • :too_large — cumulative unpacked size exceeded :max_total_bytes
  • :io — the archive file could not be opened or read

Safety:

  • :panic — Rust side panicked. This should never happen — report a bug.

Summary

Types

kind()

@type kind() ::
  :unrecognized_format | :encrypted | :corrupt | :too_large | :io | :panic

t()

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