Skip to content

Add #[eure(parse_error = CustomError)] container attribute for ParseDocument derive#71

Merged
ryo33 merged 1 commit intomainfrom
claude/custom-error-derive-1hJgf
Dec 24, 2025
Merged

Add #[eure(parse_error = CustomError)] container attribute for ParseDocument derive#71
ryo33 merged 1 commit intomainfrom
claude/custom-error-derive-1hJgf

Conversation

@ryo33
Copy link
Member

@ryo33 ryo33 commented Dec 24, 2025

Allows specifying a custom error type for the generated ParseDocument impl.
The custom error type is used instead of ParseError for type Error.
The custom type must implement From<ParseError> for ? to work.

This enables:

  • Combining multiple error sources with enum error types
  • Adding custom validation errors from nested ParseDocument impls
  • Using domain-specific error types throughout the parsing chain

…ocument derive

Allows specifying a custom error type for the generated ParseDocument impl.
The custom error type is used instead of ParseError for `type Error`.
The custom type must implement `From<ParseError>` for `?` to work.

This enables:
- Combining multiple error sources with enum error types
- Adding custom validation errors from nested ParseDocument impls
- Using domain-specific error types throughout the parsing chain
@ryo33 ryo33 force-pushed the claude/custom-error-derive-1hJgf branch from 0748675 to ff58fab Compare December 24, 2025 07:38
@ryo33 ryo33 merged commit 532392b into main Dec 24, 2025
1 check passed
@ryo33 ryo33 deleted the claude/custom-error-derive-1hJgf branch December 24, 2025 07:49
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.

2 participants