Re:Do Not Log
by fuzzy2 on Wednesday January 05, 2022 @11:13AM
(#29810802)
Not really a point I read in TFA but I agree. Catching just to log something is generally wrong.
[ Parent
| on HN ]
> Catching just to log something is generally wrong
Yes, but you should catch as soon as possible (or validate stuff as soon ass possible) and re-throw with a better error message if possible. You will thank yourself when some problem appears and instead of a random "errorcode 123" you get a detailed message like "Operation Xyz failed with errorcode 123";