Twinkie
Banned
- Messages
- 1,389
- Reaction score
- 12
- Points
- 0
Is it good programming practice for an application to anticipate and handle events that in theory should never happen?
Examples:
In my personal opinion, I think no. I think that a developer should spend more time ensuring that those events don't happen rather than reacting to them. Too much headache.
I have experienced errors on x10 that 'in theory should never happen' several times XD
Examples:
- Should a PHP application react to a database with mismatched IDs, that in other cases would produce an error?
- What happens if there is one page that adds an order ID and a order, then the next page encounters an order id without an order? Should the page react to it or exit with an error?
In my personal opinion, I think no. I think that a developer should spend more time ensuring that those events don't happen rather than reacting to them. Too much headache.
I have experienced errors on x10 that 'in theory should never happen' several times XD
Last edited: