5 ms·
But exceptions are values too, i.e. you routinely have an object of type IOException. All of the patterns presented in the article can be done easily with excep
by millstone 12y ago
But exceptions are values too, i.e. you routinely have an object of type IOException. All of the patterns presented in the article can be done easily with exceptions.
I think maybe "errors are values" is a general principle and not meant to be specific to Go.
- alecbenzer 12y agoExceptions are values too but they're more than values. "Errors are values" means "errors are values so just deal with them like you do other values".