Prevent sqlt from failing silently
Peter Rabbitson [Fri, 23 Oct 2009 08:51:05 +0000 (08:51 +0000)]
lib/DBIx/Class/Storage/DBI.pm

index 44fe102..1e558e8 100644 (file)
@@ -2628,7 +2628,11 @@ sub deployment_statements {
     parser => 'SQL::Translator::Parser::DBIx::Class',
     data => $schema,
   );
-  return $tr->translate;
+
+  my $ret = $tr->translate
+    or $self->throw_exception( 'Unable to produce deployment statements: ' . $tr->error);
+
+  return $ret;
 }
 
 sub deploy {