Artefact.Error.Operation exception (Artefact v0.2.0)

Copy Markdown View Source

Op-specific outcomes that prevent an operation from proceeding even when its inputs are valid.

Returned as {:error, %Artefact.Error.Operation{op: op, tag: tag, details: details}} from the operation that couldn't proceed. Raised by the ! variants.

Tags by op:

  • combine:no_shared_bindings
  • harmonise:self_harmonise (details: %{uuid: ...}), :same_base_label (details: %{base_label: ...})
  • graft:missing_uuid (details: %{key: ...}), :invalid_uuid (details: %{key: ..., uuid: ...}), :invalid_labels (details: %{key: ..., labels: ...}), :invalid_properties (details: %{key: ..., properties: ...}), :duplicate_keys (details: %{keys: [...]}), :unknown_rel_key (details: %{key: ...}), :islands (details: %{keys: [...]})

:details is always a map; empty when the tag carries no extra info.

Summary

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %Artefact.Error.Operation{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  details: term(),
  op: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  tag: term(),
  vars: term()
}

Create an Elixir.Artefact.Error.Operation without raising it.

Keys

  • :op
  • :tag
  • :details