Dsxir.Errors.Invalid.RuntimeProgram exception (dsxir v0.2.0)

Copy Markdown

Raised by Dsxir.RuntimeProgram.from_map/2 on structural malformation that prevents parsing (e.g. nodes is not a list, an edge endpoint tuple is the wrong shape). Semantic validation lives in Dsxir.RuntimeProgram.Validator and produces the same error shape.

errors: is a list of maps with keys :path, :code, :message, and :suggestion.

Summary

Types

entry()

@type entry() :: %{
  path: [atom() | String.t() | non_neg_integer()],
  code: atom(),
  message: String.t(),
  suggestion: nil | String.t()
}

t()

@type t() :: %Dsxir.Errors.Invalid.RuntimeProgram{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  errors: [entry()],
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Functions

exception(args)

@spec exception(opts :: Keyword.t()) :: %Dsxir.Errors.Invalid.RuntimeProgram{
  __exception__: true,
  bread_crumbs: term(),
  class: term(),
  errors: term(),
  path: term(),
  splode: term(),
  stacktrace: term(),
  vars: term()
}

Create an Elixir.Dsxir.Errors.Invalid.RuntimeProgram without raising it.

Keys

  • :errors