Skip to content

feat: introduce Error struct wrapping ErrorKind with bytepos#49

Open
stevencartavia wants to merge 1 commit into
alloy-rs:v1from
stevencartavia:pr1/error-struct
Open

feat: introduce Error struct wrapping ErrorKind with bytepos#49
stevencartavia wants to merge 1 commit into
alloy-rs:v1from
stevencartavia:pr1/error-struct

Conversation

@stevencartavia
Copy link
Copy Markdown

@stevencartavia stevencartavia commented Feb 23, 2026

Introduce Error struct wrapping ErrorKind with a bytepos field for byte-position context in decoding errors. Migrate all error return sites to use .into().

Split from #48.

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes
  • Updated CHANGELOG.md

Add an Error struct that wraps ErrorKind with a bytepos field for
byte-position context in decoding errors. Change the Result type alias
default from ErrorKind to Error.

Migrate all Err(ErrorKind::X) call sites to use .into() for ergonomic
conversion. Update derive macro generated code, tests, and examples.

Amp-Thread-ID: https://ampcode.com/threads/T-019c8b8d-c8c4-756c-b71f-4f0e1f3bba25
Co-authored-by: Amp <amp@ampcode.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant