2 ms·
In exception-safe code, you don't care if a particular statement can throw - if the code is correct today when some line can't throw, it should still be correct
by simiones 5y ago
In exception-safe code, you don't care if a particular statement can throw - if the code is correct today when some line can't throw, it should still be correct tomorrow when that line can throw.
Also, it's much easier to look for catch{} blocks than it is to look for Go code that actually handles errors, since code that forwards errors, code that wraps errors, and code that handles errors all looks more or less the same in Go (if err != nil {...}).