3 ms·
I really think how you are using the language had a large effect on how you are going to view all this. If you are building a commandline utility then the way
by pixelrevision 7y ago
I really think how you are using the language had a large effect on how you are going to view all this. If you are building a commandline utility then the way go deals with errors is great you just panic and send back a message. If you are building a long running web service you want a whole lot more info to go into your logs for when things go wrong. I dunno what the solution is but try/catch doesn’t seem to be the right thing to focus on.
- eloff 7y agoDespite the name, there's really nothing in common with try/catch. It's just sugar for if err != nil { return }.
- pfarnsworth 7y agoTry is a terrible choice for a name exactly because of try/catch, I don't know why they decided on that.