3 ms·
What would you use when you actually have an exception, then? Exception and exception handlers are a useful construct, but, like everything else, become problem
by randomdata 3y ago
What would you use when you actually have an exception, then? Exception and exception handlers are a useful construct, but, like everything else, become problematic when used outside of their intended purpose.
Just because exception and error both start with the letter "e" does not mean they are in any way related. They have very different meanings and purposes.
- usrnm 3y agoIf they are really exceptional situations that should never happen, just crash the process. The moment recover was added they become just another error handling mechanism
- randomdata 3y agoYou would crash the process. But, sometimes it's useful to do a little bookkeeping first.
- usrnm 3y agoThat's not how recover is used in practice
- randomdata 3y agoRight. In practice, people don't even realize that Go has an exception handling system (see rest of thread) to use.