[San-Diego-pm] CGI Program Problem

Wood, William wwood at ucsd.edu
Fri Mar 4 15:06:02 PST 2005


I have a problem I hope you can give me some advice on.

 

My organization is going thru a conversion from Sybase to DB2. We have
cgi framework written in perl that has depends on the sybperl exported
routines dberrhandle and dbmsghandle. The framework traps all database
errors, formats an error message and returns the message to the users
browser. None of the hundreds of scripts that utilize the framework
perform manual error checking. 

 

The conversion to DB2 will require that we switch to using DBI.
Apparently DBI does not provide the exported routine technique for
handling error conditions. The closest thing I can find is setting
PrintError and RaiseError when the db connection is established and then
using $SIG{__WARN__} and $SIG{__DIE__} to redirect the messages for
formatting and display. 

 

I also read that using this technique should be a last resort. Does
anyone have a suggestion of how to implement a centralized error
handling technique similar to the sybperl exported routine approach or
is the __DIE__ method my only option?

 

Bill Wood

UCSD Administrative Computing

wwood at ucsd.edu

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/san-diego-pm/attachments/20050304/1d569145/attachment.htm


More information about the San-Diego-pm mailing list