Hello all !


I try to set automatic error checking for whole script !
Error Checking should be done during every operation with DB like
connect , execute,
disconnect , prepare . And in case of error programm should be
terminated !

My way is :

%attr = (
    PrintError=>1,
    RaiseError=>1
         );
or
$h->{PrintError} = 1;
$h->{RaiseError} = 1;

but during execution wrong sql query I only get this warning
DBD::mysql::st execute failed: Table 'sms.pentiu' doesn't exist at
./check_available_driver.pl line 23.
DBD::mysql::st fetchrow_array failed: fetch() without execute() at
./check_available_driver.pl line 24.
and programm does not terminate untile Iset

$sth->execute || die "$DBI::errstr\n";

when it's look ok and programm is stopped with next message :

DBD::mysql::st execute failed: Table 'sms.pentiu' doesn't exist at
./check_available_driver.pl line 23.
Table 'sms.pentiu' doesn't exist


so how I could check every operation without checking it directly?


Reply via email to