# `Yarnspinnex.RuntimeError`
[🔗](https://github.com/atavistock/yarnspinnex/blob/main/lib/yarnspinnex/runtime_error.ex#L1)

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.

# `t`

```elixir
@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()}]
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
