One error struct for both the text and binary pipelines, so a caller
never has to special-case which one produced it. Wraps Ichor.Error
verbatim for the text side (including its caret-annotated
context_lines, useful for CLI/log output); the binary side has no
source text to annotate, so it only ever carries a message, a byte
offset, and a stage.
Also the channel for schema-violation errors: those come back with
stage: :action, the same stage Ichor.Error already uses for
Ichor.Actions-level failures (a handle_rule/3/handle_token/3
callback returning {:error, _}) — so a schema violation and a
syntax error are indistinguishable by shape alone, and a caller only
ever needs to check {:error, %Dextrin.Error{}}.
Summary
Types
@type stage() :: Ichor.Error.stage() | :binary
@type t() :: %Dextrin.Error{ byte_offset: non_neg_integer() | nil, ichor_error: Ichor.Error.t() | nil, message: String.t(), stage: stage() }