Skip to content

feat: Recover from errors with move semantics#44

Closed
MoreDelay wants to merge 2 commits intofast:mainfrom
MoreDelay:recovery
Closed

feat: Recover from errors with move semantics#44
MoreDelay wants to merge 2 commits intofast:mainfrom
MoreDelay:recovery

Conversation

@MoreDelay
Copy link
Copy Markdown

This is an experiment on how to recover from errors using move semantics. This adds an additional (generic) field to Exn<E, R> which we can move out using exn.recover(). By default we have no recovery value so all previous uses of Exn are unchanged.

I also added an example to show how one would use this recovery mechanism.

This PR is only intended as a reference for issue #43. There may be better approaches on how to achieve this goal.

@andylokandy
Copy link
Copy Markdown
Contributor

Thanks for putting this experiment together.

After the follow-up discussion in #50, we decided not to pursue move-based recovery in exn for now. #53 reverts the narrower root-only API from #48, and this PR was mainly a reference implementation for #43.

I'll close this, but the experiment is still useful context if we revisit owned traversal later.

@andylokandy andylokandy closed this May 4, 2026
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