X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fstorage%2Ftxn.t;h=ea9845fff2deb2ec0682caabbaeffcb20d7a00ad;hb=e240b8ba6a26e17bed8e87235bcc201eefca350d;hp=f8a729f4ba7410c89a3c14cf8473d2a9d82dc726;hpb=c5915b4555c90082664942a4485bee970a8ea8d2;p=dbsrgits%2FDBIx-Class.git diff --git a/t/storage/txn.t b/t/storage/txn.t index f8a729f..ea9845f 100644 --- a/t/storage/txn.t +++ b/t/storage/txn.t @@ -453,6 +453,17 @@ warnings_are { } qr/\QTransaction aborted: $broken_exception. Rollback failed: lost connection to storage at @{[__FILE__]} line $ln\E\n/; # FIXME wtf - ...\E$/m doesn't work here is @w, 1, 'One matching warning only'; + + # try the same broken exception object, but have exception_action inject it + $s->exception_action(sub { die $broken_exception }); + eval { + $s->txn_do( sub { + die "some string masked away"; + }); + }; + isa_ok $@, 'DBICTest::BrokenOverload', 'Deficient exception properly propagated'; + + is @w, 2, 'The warning was emitted a second time'; } done_testing;