Chapter 3
Handling Errors
Chapter Objectives
- Identify and eliminate some problems inherent in CGI scripts.
- Explain and use the undef value.
Topics
Lab: A CGI script that:
- Dumps the title table from the test_nile
database, as in the previous chapter.
- Uses
eval:
- Catch database errors
- Instead of just dropping dead when they happen
- Tests results with defined():
- Checks that real handles were returned
- Instead of just dying if it tries to use one
when there is none.
Dan Keller Technical Services © 2000