3 ms·
Error handling is one of those things that involve a lot of nuance, and that most people try to turn into a black-and-white argument. The fact is, there are di
by kstenerud 6y ago
Error handling is one of those things that involve a lot of nuance, and that most people try to turn into a black-and-white argument.
The fact is, there are different classes of errors that need to be handled differently. Even the standard go runtime library operates on this principle. Some errors are returned to the user as a return value, while others trigger exceptions (called "panics" in go).
Trying to shoehorn all errors into a single mechanism is a fool's errand.