3 ms·
"2. If you can't do 1, recover from the error silently and continue on with the program" I think that defensive programming is the worst way of dealing with er
by ahoka 9y ago
"2. If you can't do 1, recover from the error silently and continue on with the program"
I think that defensive programming is the worst way of dealing with errors. You are now silently diverging from your business requirements by making up data.
- ryandrake 9y agoThanks for the reply. Yep, this is a topic that reasonable people can disagree about. I suppose I could add "if there's no loss of user data, recover from the error silently and continue on with the program". An example of #2 would be a network connection failure that can be retried without consequence to business logic.