Figler.Error exception (figler v0.1.0-beta.1)

Copy Markdown View Source

Stable public error raised by document, scene-query, and graph entrypoints.

Functions that return values directly raise this exception for malformed input. Tuple-returning APIs, such as Figler.Document.open/1, return the same exception as {:error, error}. Callers should branch on :code and :operation; the operation may identify the public call or the failing decoding stage, while :context contains structured diagnostic details.

Summary

Types

code()

@type code() ::
  :invalid_archive
  | :missing_canvas
  | :invalid_document
  | :invalid_query
  | :invalid_guid
  | :invalid_options
  | :insufficient_graph_projection

t()

@type t() :: %Figler.Error{
  __exception__: term(),
  code: code(),
  context: map(),
  operation: atom()
}