The importance of error checking
l Errors happen!
n Failure happens when you don't expect errors!
database crash / network disconnection
lack of disk space for insert or select (sort space for order by)
server math error on select (divide by zero)
and maybe, just maybe, errors in your own code (Gasp!)
n Beat failure by expecting errors!
n Detect errors early to limit effects
Defensive Programming, e.g., check assumptions
Through Programming, e.g., check for errors after fetch loops
17