StaticwrapWraps any thrown error from the text/binary pipelines into a
DXNError, preserving a lexer/parser's own offset when present
and passing everything else through as cause — so callers only
ever need to catch one error type from decode/encode.
Fileoverview
One error type for every
dextrinfailure mode — text-parse, printing, and (in later phases) binary/schema failures alike — mirroringDextrin.Error's "a caller never has to special-case which pipeline produced it" role.API-shape divergence from Elixir, deliberate:
Dextrin's own functions return{:ok, _} | {:error, %Dextrin.Error{}}tuples, idiomatic in an Elixir/with-based codebase.node-dextrinthrowsDXNErrorinstead — idiomatic JS/Node (same conventionJSON.parse, most YAML/TOML parsers, etc. already use), not a value-representation choice the "mirror Elixir's shape" goal this project otherwise follows was ever about. A non-throwing variant can be layered on top later if needed; throwing is the default.