Merge 'trunk' into 'DBIx-Class-current'
Dagfinn Ilmari Mannsåker [Wed, 30 May 2007 11:31:47 +0000 (06:31 -0500)]
r32073@brandon-blacks-computer (orig r3439):  ilmari | 2007-05-30 06:31:47 -0500
Include the DBI error message if a deploy statement fails.

1  2 
lib/DBIx/Class/Storage/DBI.pm

@@@ -1441,7 -1125,7 +1441,7 @@@ sub deploy 
        next if($_ =~ /^COMMIT/m);
        next if $_ =~ /^\s+$/; # skip whitespace only
        $self->debugobj->query_start($_) if $self->debug;
-       $self->dbh->do($_) or warn "SQL was:\n $_"; # XXX exceptions?
 -      $self->dbh->do($_) or warn $self->dbh->errstr, "\nSQL was:\n $_";
++      $self->dbh->do($_) or warn $self->dbh->errstr, "\nSQL was:\n $_"; # XXX throw_exception?
        $self->debugobj->query_end($_) if $self->debug;
      }
    }