4 ms·
Ok, we won't call them exception handlers. Instead, call them "if anything goes wrong in this function do this" handlers.
by spullara 8y ago
Ok, we won't call them exception handlers. Instead, call them "if anything goes wrong in this function do this" handlers.
- SamWhited 8y agoThose are very different things, whatever you want to call them. check/handle doesn't involve unwinding the stack, and doesn't default to crashing your program if you forget to add a handle block.
- tonyedgecombe 8y agoand doesn't default to crashing your program if you forget to add a handle block Is that a good thing?
- grey-area 8y agoIs that a good thing? Yes, because instead your program won’t compile if you forget to handle an error ( except in the case of a function which only returns error, which you can ignore by mistake - I would like to see that fixed in go 2 as well).