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