Skip to content
This repository was archived by the owner on Oct 16, 2026. It is now read-only.

Detailed error - #280

Draft
SzczurekYT wants to merge 3 commits into
mainfrom
feat/detailed-error
Draft

SzczurekYT wants to merge 3 commits into
mainfrom
feat/detailed-error

Conversation

@SzczurekYT

@SzczurekYT SzczurekYT commented Nov 29, 2025 •

Copy link
Copy Markdown
Contributor

Adds a DetailedError<T: Error> wrapper error, that together with the new mkerr! macro can be used to capture additional information about where in the source code it was constructed, and the active tracing Spans at that moment.

Todo:

  • Test the ergonomy of this solution and see if it can be improved (I'm seeing some small issues)
  • Figure out what happens when you accidentally nest multiple DetailedErrors
  • Implement it all over the place
  • In the future: Make sure others use it (a check, like with mod.rs?)

@SzczurekYT

Copy link
Copy Markdown
Contributor Author

Reworked this without the mkerr! just as a regular error that does the capture on construction.

Comment thread crates/crab_utils/src/error.rs
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants