default => quote_sub(q{ 0 }),
lazy => 1,
trigger => quote_sub(q{
- DBIx::Class::Exception->throw(sprintf (
+ $_[0]->throw_exception( sprintf (
'Exceeded max_retried_count amount of %d, latest exception: %s',
$_[0]->max_retried_count, $_[0]->last_exception
)) if $_[0]->max_retried_count < ($_[1]||0);
sub last_exception { shift->exception_stack->[-1] }
+sub throw_exception { shift->storage->throw_exception (@_) }
+
sub run {
my $self = shift;
- DBIx::Class::Exception->throw('run() takes no arguments') if @_;
+ $self->throw_exception('run() takes no arguments') if @_;
$self->_reset_exception_stack;
$self->_reset_retried_count;
$storage->ensure_connected;
# if txn_depth is > 1 this means something was done to the
- # original $dbh, otherwise we would not get past the preceeding if()
+ # original $dbh, otherwise we would not get past the preceding if()
$storage->throw_exception(sprintf
'Unexpected transaction depth of %d on freshly connected handle',
$storage->transaction_depth,