X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FBlockRunner.pm;h=64d5164cdf76db89f8bf83db54f4274bce67255a;hb=c6ec79000b160e7491d9ab9d95d6e69c473b0862;hp=9b5bdbc6b51a888dd4eca1132d234423a293a815;hpb=d3a2e424976a449718ad750b72d4bf3acf689caf;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/BlockRunner.pm b/lib/DBIx/Class/Storage/BlockRunner.pm index 9b5bdbc..64d5164 100644 --- a/lib/DBIx/Class/Storage/BlockRunner.pm +++ b/lib/DBIx/Class/Storage/BlockRunner.pm @@ -4,12 +4,10 @@ package # hide from pause until we figure it all out use warnings; use strict; -use DBIx::Class::Exception; use DBIx::Class::Carp; use Context::Preserve 'preserve_context'; -use DBIx::Class::_Util qw( is_exception qsub dbic_internal_try ); +use DBIx::Class::_Util qw( is_exception qsub dbic_internal_try dbic_internal_catch ); use Scalar::Util qw(weaken blessed reftype); -use Try::Tiny; use Moo; use namespace::clean; @@ -128,7 +126,7 @@ sub _run { $txn_begin_ok = 1; } $cref->( @$args ); - } catch { + } dbic_internal_catch { $run_err = $_; (); # important, affects @_ below }; @@ -160,7 +158,7 @@ sub _run { $storage->txn_commit; 1; } - catch { + dbic_internal_catch { $run_err = $_; }; } @@ -190,7 +188,8 @@ sub _run { ) or ! do { - local $self->storage->{_in_do_block_retry_handler} = 1; + local $self->storage->{_in_do_block_retry_handler} = 1 + unless $self->storage->{_in_do_block_retry_handler}; $self->retry_handler->($self) } );