[Affelio-cvs 1253] CVS update: affelio/apps/bb

Back to archive index

Yoshihisa Fukuhara higef****@users*****
2006年 5月 16日 (火) 17:38:50 JST


Index: affelio/apps/bb/bb.pm
diff -u affelio/apps/bb/bb.pm:1.8 affelio/apps/bb/bb.pm:1.9
--- affelio/apps/bb/bb.pm:1.8	Mon May 15 14:58:53 2006
+++ affelio/apps/bb/bb.pm	Tue May 16 17:38:50 2006
@@ -285,12 +285,20 @@
 ##############################################
 sub getColumn {
     my ($self, $query) = @_;
-    my $sth = $self->{dbh}->prepare($query);
-    $sth->execute;
+    my $sth;
     my $num;
-    $sth->bind_columns(undef, \$num);
-    $sth->fetch;
-    $sth->finish;
+    try {
+	$sth=$self->{dbh}->prepare($query);
+	$sth->execute;
+	$sth->bind_columns(undef, \$num);
+	$sth->fetch;
+	$sth->finish;
+    }catch Error with{
+	my $err= shift;
+	debug_print("getColumn faild. $err");
+	return $num=-1;
+    };
+
     if($num) {
 	return $num;
     }


Affelio-cvs メーリングリストの案内
Back to archive index