|
|
|
|
|
by fierro
1864 days ago
|
|
the fundamental tenet in Go is that every error should be handled. Here is an excerpt from Dave Cheney that clarifies this: "For the truly exceptional cases, the ones that represent either unrecoverable programming mistakes, like index out of bounds, or unrecoverable environmental problem, like running out of stack, we have panic. For all of the remaining cases, any error conditions that you will encounter in a Go program, are by definition not exceptional — you expect them because regardless of returning a boolean, an error, or panicing, it is the result of a test in your code" |
|
That's true in Java as well.