This addresses a problem very similar to that in LP #
1075167, where
certain loops never end because problems with the data elicited calls to
carp(), which fills up log, but never gives our loops notice to end.
Visible symptoms include 1) a greate volume of log spew and 2) an
open-ils.serial drone that ties up a CPU.
The fault lies maybe in our loops rather than in the MFHD
package, but this fixes the problem fastest, and should not have
undesirable side-effects.
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
# A calendar change is defined, need to check if it applies
if (scalar(@{$new}) == 1) {
- carp "Can't calculate date change for ", $self->as_string;
+ croak "Can't calculate date change for ", $self->as_string;
return 0;
}
# There was no suitable publication pattern defined,
# so use the $w frequency to figure out the next date
if (!defined($freq)) {
- carp "Undefined frequency in next_chron!";
+ croak "Undefined frequency in next_chron!";
} elsif (!MFHD::Date::can_increment($freq)) {
croak "Don't know how to deal with frequency '$freq'!";
} else {