D
daniel.crosby
the resulting output occassionaly produces ERROR DIE main:
Can't call method "prepare" on an undefined value at line 1365. - No
event sent!
How can I prevent a die from occurring setting PrintError=>0,
RaiseError=>0 does not seem to help.
local $SIG{ALRM} = sub { die "TIMEOUT: unable to connect
database $G_CONF{INSERT_DB} \n"};
alarm $G_CONF{TIMEOUT_INVDB};
$l_cstr="DBI:Oracle:$G_CONF{INSERT_DB}";
$l_h =
DBI->connect($l_cstr,$G_CONF{INSERT_USER},$G_CONF{INSERT_PASS}, {
PrintError=>0, RaiseError=>0, AutoCom
mit=>1 } );
&Logging (2, $I, "insert", "prepare $l_insert");
-> line 1365 is below prepare
$l_x=$l_h->prepare ($l_insert ) or &Error ("Prepare $l_insert
failed", "insert");
$l_x->execute or &Error ("Execute $l_insert failed", "insert");
$G_DBCON->disconnect or &Warn ( "Can not close config DB
$G_CONF{CONFIG_DB} - $DBI::errstr", "disconnect");
alarm 0;
};
Can't call method "prepare" on an undefined value at line 1365. - No
event sent!
How can I prevent a die from occurring setting PrintError=>0,
RaiseError=>0 does not seem to help.
local $SIG{ALRM} = sub { die "TIMEOUT: unable to connect
database $G_CONF{INSERT_DB} \n"};
alarm $G_CONF{TIMEOUT_INVDB};
$l_cstr="DBI:Oracle:$G_CONF{INSERT_DB}";
$l_h =
DBI->connect($l_cstr,$G_CONF{INSERT_USER},$G_CONF{INSERT_PASS}, {
PrintError=>0, RaiseError=>0, AutoCom
mit=>1 } );
&Logging (2, $I, "insert", "prepare $l_insert");
-> line 1365 is below prepare
$l_x=$l_h->prepare ($l_insert ) or &Error ("Prepare $l_insert
failed", "insert");
$l_x->execute or &Error ("Execute $l_insert failed", "insert");
$G_DBCON->disconnect or &Warn ( "Can not close config DB
$G_CONF{CONFIG_DB} - $DBI::errstr", "disconnect");
alarm 0;
};