Thanks for the links, and panic is the usual retort. My problem is with the boilerplate between methods. If A calls B calls C calls D calls E which can have issues that A wants to handle (eg try a different IP address) then all the intermediary functions will need code like:
foo,bar,err=callX(...)
if err!=nil:
return _,_,err
It is the last two lines of boilerplate that need to be present for virtually every call that makes me uncomfortable. Developers will start forgetting or not being diligent which causes problems. Also I think (but don't know) that by the time A gets an Error it won't know what the stack trace is for the original Error. (The stack traces are extremely useful for logging and analytics not for program behaviour.)
Needing to write the boilerplate means it is left out. For example look at all the hello world examples. Note how they all ignore any errors from the println. C has exactly the same problem, and I'm disappointed that Go is perpetuating this problem.
Needing to write the boilerplate means it is left out. For example look at all the hello world examples. Note how they all ignore any errors from the println. C has exactly the same problem, and I'm disappointed that Go is perpetuating this problem.