Skip to content

Question on error-stack #175

Answered by SeaDve
TimDiekmann asked this question in Q&A
Aug 19, 2022 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

error-stack shake up error handling as it allows me to think of possible error paths more thoroughly and think of error messages in a by-level-of-abstraction way. For a bonus, it is easy to attach arbitrary objects in error.

However, I moved back to anyhow as most of the time, creating a by-level-of-abstraction error message is not very important and could have some development overhead, especially when thinking of an error struct/enum name or when to change context. Additionally, it could hinder readability (at least for me), especially if there are a lot of lines that early return an error that does not return a Report directly, having to call report() manually for each line.

In general e…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@TimDiekmann
Comment options

Answer selected by TimDiekmann
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants