From: Arthur Axel 'fREW' Schmidt Date: Sat, 22 May 2010 08:44:00 +0000 (-0500) Subject: SQL errors should cause DBICDH to die X-Git-Tag: v0.001000_12~9 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=10a62c3dc14ffcd9770479867e2abbe04632d16d;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git SQL errors should cause DBICDH to die --- diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index affcf56..d5be4a4 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -173,13 +173,12 @@ method _run_sql_array($sql) { log_trace { '[DBICDH] Running SQL ' . Dumper($sql) }; foreach my $line (@{$sql}) { $storage->_query_start($line); + # the whole reason we do this is so that we can see the line that was run try { - # do a dbh_do cycle here, as we need some error checking in - # place (even though we will ignore errors) $storage->dbh_do (sub { $_[1]->do($line) }); } catch { - carp "$_ (running '${line}')" + die "$_ (running line '$line')" } $storage->_query_end($line); }