Cadmpeg.Error exception (ExCadmpeg v0.1.0)

Copy Markdown View Source

A refusal from the engine, with the code a caller can branch on.

The codes are this binding's own, one per kind of refusal:

  • "unreadable" — the file is not there, or cannot be opened;
  • "unrecognized" — no codec in this build recognized the bytes; the message lists what it does read;
  • "refused" — a codec recognized the file and refused to transfer it faithfully: a strict-policy refusal, or an export that cannot carry what the document holds;
  • "bad_request" — the question was malformed: a format word this build cannot write, a document that is not its JSON;
  • "unwritable" — the output path cannot be created;
  • "internal" — a report that could not be serialised.

A refusal is a value, not an exception: a call that cannot answer still answers, and says what to try next.

Summary

Functions

A refusal, from the engine's {code, message} pair.

Types

t()

@type t() :: %Cadmpeg.Error{
  __exception__: term(),
  code: String.t(),
  message: String.t()
}

Functions

new(arg)

@spec new({String.t(), String.t()}) :: t()

A refusal, from the engine's {code, message} pair.