top | item 36401309

(no title)

evercast | 2 years ago

> Usually this isn’t necessary and its better to just return the error unwrapped.

This is a terrible advice. Wrapping is extremely helpful in providing additional context for the error travelling up the call stack. Without wrapping, one typically ends up with software logging generic errors like "file not found" , which you can't act on because... you don't know where it's coming from. If you skip error wrapping, better be ready to enjoy quality time when production crashes.

discuss

order

No comments yet.