Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> But once you've written tests to prove that you've handled the error correctly, you've also proven that you handled the error

Hardly. Suppose all caught errors in a particular module of code bubble up to a call site which (say) retries with exponential back-off. If the compiler can guarantee that I handle every error, I only need one test that checks whether the exponential back-off logic works. With no error handling guarantee, I'd need to test that every error case is correctly caught—otherwise my output might be corrupted.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: