3 ms·
In languages where they are exceptions and are not returned, but thrown and require special syntax to handle.
by NateDad 12y ago
In languages where they are exceptions and are not returned, but thrown and require special syntax to handle.
- millstone 12y agoBut 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".