Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Make the errors from NoEventStorage bubble up through History.

So the user sees their own call to TB2::History not inside TB2::History.

For #198
  • Loading branch information...
commit adc2c556fbb3f8fce8696296dcda1484c68c4c96 1 parent e47df19
@schwern schwern authored
Showing with 5 additions and 0 deletions.
  1. +2 −0  lib/TB2/History/NoEventStorage.pm
  2. +3 −0  t/History/History.t
View
2  lib/TB2/History/NoEventStorage.pm
@@ -4,6 +4,8 @@ use Carp;
use TB2::Mouse;
extends 'TB2::History::EventStorage';
+our @CARP_NOT = qw(TB2::History);
+
=head1 NAME
View
3  t/History/History.t
@@ -72,7 +72,10 @@ note "Turn off event storage";
is $history->event_count, 3;
ok !eval { $history->events; 1 };
+ is $@, sprintf "Events are not stored at %s line %d.\n", __FILE__, __LINE__-1;
+
ok !eval { $history->results; 1 };
+ is $@, sprintf "Results are not stored at %s line %d.\n", __FILE__, __LINE__-1;
ok !eval { $history->store_events(1) }, "can't turn on storage for an existing object";
}
Please sign in to comment.
Something went wrong with that request. Please try again.