catching errors from BDI.pm
От
Jeffrey
Тема
catching errors from BDI.pm
Дата
Msg-id
B51E537E.375B%seesej@uswest.net
Список
Дерево обсуждения
catching errors from BDI.pm Jeffrey <seesej@uswest.net>
Hi,
I am having trouble catching errors from postgress. I am connecting to the
database via perl and DBI.pm The following will work
($dbh = DBI->connect("$dsn", "", "") ) or (print $DBI::errstr and exit());
But this wont (from deliberately spelled wrong)
($sth=$dbh->prepare("select * form tablename")) || (
# error
print "\nError".$dbh->errstr
# error
);
Actually it will work from a telnet prompt, but if I run this script in a
cgi, it writes the error to the error log instead of the standard out. It
does not execute the code inside the error comments.
Thank you for your help
Jeff Seese
В списке pgsql-general по дате отправления