Home : Products : Gossamer Links : Development, Plugins and Globals :

Products: Gossamer Links: Development, Plugins and Globals: Re: [Ian] Customising Error Messages on $DB errors: Edit Log

Here is the list of edits for this post
Re: [Ian] Customising Error Messages on $DB errors
Change sub fatal in Links.pm. Or if it's for a separate cgi script, add the line:

local $SIG{__DIE__} = \&MyModule::my_fatal;

and in MyModule.pm create a function my_fatal, modelled after Links::fatal.

EDIT: do you really want your script to die after this error, don't you want to just print out the error, and go on with the script, i.e. something like

my $error;
$table->insert($record) or $error = $GT::SQL::error;
if ($error) {
do something useful here ...
}

Ivan
-----
Iyengar Yoga Resources / GT Plugins

Last edited by:

yogi: Jul 7, 2002, 1:56 PM

Edit Log: