[LON-CAPA-cvs] cvs: loncom /interface lonmysql.pm

matthew lon-capa-cvs@mail.lon-capa.org
Mon, 19 Apr 2004 21:29:15 -0000


matthew		Mon Apr 19 17:29:15 2004 EDT

  Modified files:              
    /loncom/interface	lonmysql.pm 
  Log:
  &create_table: now report the error (with $dbh->errstr()) instead of 
  acting like we did and there was no error.
  
  
Index: loncom/interface/lonmysql.pm
diff -u loncom/interface/lonmysql.pm:1.19 loncom/interface/lonmysql.pm:1.20
--- loncom/interface/lonmysql.pm:1.19	Wed Mar  3 12:19:06 2004
+++ loncom/interface/lonmysql.pm	Mon Apr 19 17:29:15 2004
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # MySQL utility functions
 #
-# $Id: lonmysql.pm,v 1.19 2004/03/03 17:19:06 matthew Exp $
+# $Id: lonmysql.pm,v 1.20 2004/04/19 21:29:15 matthew Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -714,7 +714,8 @@
     #############################################
     my $count = $dbh->do($request);
     if (! defined($count)) {
-        $errorstring = "$dbh ATTEMPTED:\n".$request."\nRESULTING ERROR:\n";
+        $errorstring = "$dbh ATTEMPTED:\n".$request."\nRESULTING ERROR:\n".
+            $dbh->errstr();
         return undef;
     }
     #