From: Dagfinn Ilmari Mannsåker Date: Wed, 30 May 2007 11:31:47 +0000 (+0000) Subject: Include the DBI error message if a deploy statement fails. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d36325cc288373f9113d1007d6f4470a05f51cb8;p=dbsrgits%2FDBIx-Class-Historic.git Include the DBI error message if a deploy statement fails. --- diff --git a/lib/DBIx/Class/Storage/DBI.pm b/lib/DBIx/Class/Storage/DBI.pm index bc66144..1c43c71 100644 --- a/lib/DBIx/Class/Storage/DBI.pm +++ b/lib/DBIx/Class/Storage/DBI.pm @@ -1125,7 +1125,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 $_"; + $self->dbh->do($_) or warn $self->dbh->errstr, "\nSQL was:\n $_"; $self->debugobj->query_end($_) if $self->debug; } }