News for hackers. Stuff that matters.
Re:Go’ing Insane: Endless Error Handling by simiones on Tuesday September 14, 2021 @10:21AM (#28525241)
Not really. If the original error is `fmt.Errorf("divide by 0")`, no amount of `fmt.Errorf("failed to divide: %w")` will help anyone programmatically recognize the error.
Re:Go’ing Insane: Endless Error Handling by lox on Tuesday September 14, 2021 @05:29PM (#28531604)
Yup, fair point, I thought we were talking about libraries replacing errors to obscure the original, which absolutely happens. Lots of libraries (e.g aws-sdk) do use typed errors, so wrapping them correctly for smaller libraries that compose them is important.