Yarnspinnex.RuntimeError exception (yarnspinnex v0.3.0)

Copy Markdown View Source

Raised by Yarnspinnex.step/3 and Yarnspinnex.choose/4 when a statement cannot run: a type error in an expression, a host function that failed, a cursor that does not fit the script, or a script that loops without ever producing an event. node and line locate the statement; path and index are the cursor position for cases with no statement to point at.

Summary

Types

t()

@type t() :: %Yarnspinnex.RuntimeError{
  __exception__: term(),
  description: String.t(),
  index: non_neg_integer() | nil,
  line: pos_integer() | nil,
  node: String.t() | nil,
  path: [{non_neg_integer(), Yarnspinnex.Cursor.selector()}]
}