Re:Error stack traces in Go with x/xerror
by simiones on Tuesday August 24, 2021 @06:45AM
(#28287050)
The whole point of Exceptions is to avoid writing try/catch all over the place. Let's take an example of idiomatic exception-based code:
vs
Of course, we can write the second example with try/catch as well, but the whole point of exceptions is to be able to write the first one when appropriate.
[ Parent
| on HN ]
> The whole point of Exceptions is to avoid writing try/catch all over the place
Of course. I'm talking about when you actually handle your exceptions you should be specific about the lines you're handling.