3 ms·
"for about the same coding difficulty." Oh really? Checking every single function call for an error return code doesn't complicate things?
by penguindev 13y ago
"for about the same coding difficulty."
Oh really? Checking every single function call for an error return code doesn't complicate things?
- genwin 13y agoIf the function has less chance of erroring than a hardware failure, why check? I have a function that calls functions that call functions and so on. At the top level function I check if Go has panic()ked; if so I recover() and report the nice error message I want. Seems to offer close enough functionality to try...catch.