Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
marcus_holmes
· 3y ago · 0 comments
Surprised that the "always wrap your errors" rule isn't in there. It's been the rule in the last few Go teams I've been in.
Comments
[–]
AlexCoventry
3y ago
We moved away from wrapping them recently for performance reasons.
[–]
sethammons
3y ago
You got to add more context here. An entire blog post would be worthy. We do some very performant code at high scale and error wrapping has never put pressure on our systems. Highly interested in what you saw.
[–]
preseinger
3y ago
what programs are you writing where error wrapping represents a performance cost that's worth avoiding???
[–]
za3faran
3y ago
How much of a performance hit were they causing?
[–]
lanstin
3y ago
and how many errors are they getting?
[–]
stephen123
3y ago
It seems like a waste of time to me. Wrapping errors adds context. But you can usually get enough context from stack traces.
[–]
masklinn
3y ago
But you don’t have stacktraces.