From: Arthur Axel 'fREW' Schmidt Date: Sat, 10 Sep 2011 18:52:36 +0000 (-0500) Subject: croak on a couple errors that should be fatal X-Git-Tag: v0.001006~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6e9a733d577c24ac4fe4569515fbf94fecf40f5c;p=dbsrgits%2FDBIx-Class-DeploymentHandler.git croak on a couple errors that should be fatal --- diff --git a/Changes b/Changes index 8416d28..2e3ff02 100644 --- a/Changes +++ b/Changes @@ -2,6 +2,7 @@ Revision history for {{$dist->name}} {{$NEXT}} - Stop warning all the time (ribasushi) + - croak on a couple errors that should be fatal - Stop deleting the wrong version (for downgrades) - Fix documentation for in the Cookbook (moltar) diff --git a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm index d576bc1..1fbf933 100644 --- a/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm +++ b/lib/DBIx/Class/DeploymentHandler/DeployMethod/SQL/Translator.pm @@ -265,11 +265,11 @@ method _run_perl($filename, $versions) { Dlog_trace { "Running Perl $_" } $fn; if ($@) { - carp "$filename failed to compile: $@"; + croak "$filename failed to compile: $@"; } elsif (ref $fn eq 'CODE') { $fn->($self->schema, $versions) } else { - carp "$filename should define an anonymouse sub that takes a schema but it didn't!"; + croak "$filename should define an anonymouse sub that takes a schema but it didn't!"; } } @@ -337,11 +337,11 @@ sub initialize { use warnings; if ($@) { - carp "$filename failed to compile: $@"; + croak "$filename failed to compile: $@"; } elsif (ref $fn eq 'CODE') { $fn->() } else { - carp "$filename should define an anonymous sub but it didn't!"; + croak "$filename should define an anonymous sub but it didn't!"; } } else { croak "A file ($filename) got to initialize_scripts that wasn't sql or perl!";