12 # make sure nothing eats the exceptions (an unchecked eval in Storage::DESTROY used to be a problem)
15 package Dying::Storage;
20 use base 'DBIx::Class::Storage::DBI';
24 my $death = $self->_dbi_connect_info->[3]{die};
26 die "storage test died: $death" if $death eq 'before_populate';
27 my $ret = $self->next::method (@_);
28 die "storage test died: $death" if $death eq 'after_populate';
34 for (qw/before_populate after_populate/) {
36 my $schema = DBICTest::Schema->clone;
37 $schema->storage_type ('Dying::Storage');
38 $schema->connection (DBICTest->_database, { die => $_ });
39 $schema->storage->ensure_connected;
40 }, "$_ exception found");