4 ms·
> If you spend more than half your time in error handling, you have an architectural design issue with your code. Ha, I once wrote a lock_file(...) function in
by speedplane 8y ago
> If you spend more than half your time in error handling, you have an architectural design issue with your code.
Ha, I once wrote a lock_file(...) function in 30 minutes. Then spent the next two years getting it to work on various platforms, on network drives, dealing with re-entrance, and so many other corner-cases you couldn't believe. The initial 10 line function turned into a whole module.
I'm not sure that counts as error handling as much as handling things you don't expect.