# The importance of error checking

- ## Errors happen!

  - 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 after 10,000 rows)
    - and maybe, just maybe, errors in your own code [Gasp!]
  - Beat failure by expecting errors!
  - Detect errors early to limit effects
    - Defensive Programming, e.g., check assumptions
    - Through Programming, e.g., check for errors after fetch loops

## .

Previous slide | Next slide | Back to first slide | View graphic version