X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FBlockRunner.pm;h=352c76c13f89ca5e765ebf30df34a743059f32d5;hb=841efcb3f;hp=05fe47574ed5736600420da38449cda620f913ea;hpb=7664b1a03c8f4da961d1f9795c9af1d545a24ea1;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/BlockRunner.pm b/lib/DBIx/Class/Storage/BlockRunner.pm index 05fe475..352c76c 100644 --- a/lib/DBIx/Class/Storage/BlockRunner.pm +++ b/lib/DBIx/Class/Storage/BlockRunner.pm @@ -5,6 +5,7 @@ use Sub::Quote 'quote_sub'; use DBIx::Class::Exception; use DBIx::Class::Carp; use Context::Preserve 'preserve_context'; +use DBIx::Class::_Util 'is_exception'; use Scalar::Util qw(weaken blessed reftype); use Try::Tiny; use Moo; @@ -154,7 +155,7 @@ sub _run { } # something above threw an error (could be the begin, the code or the commit) - if ($run_err ne '') { + if ( is_exception $run_err ) { # attempt a rollback if we did begin in the first place if ($txn_begin_ok) {