News for hackers. Stuff that matters.
Re:New in Go 1.20: wrapping multiple errors by kaba0 on Tuesday December 13, 2022 @05:38AM (#33966992)
This is literally the exact same thing. Exceptions are not gotos. They bubble up one method at a time, and can be handled at any level you want. Matching on a result type is literally the same thing as putting in inside a try-catch block. Putting a ? macro at the end is literally the default behavior. You can handle it on as tight/wide scope as you wish, plus you also get a must-have stacktrace — so your debugging is just looking at where the exception originated from.

There are no comments on this comment yet.