From 12751e0cb7556a9dd23abdfddf1ad70bb3184c70 Mon Sep 17 00:00:00 2001 From: Lebbeous Fogle-Weekley Date: Wed, 13 Feb 2013 10:34:17 -0500 Subject: [PATCH] Serials: change more carp() to croak() to avoid infinite loops 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 Signed-off-by: Dan Wells --- Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm index bec26771b3..a873372f17 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/Utils/MFHD/Caption.pm @@ -335,7 +335,7 @@ sub calendar_increment { # 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; } @@ -473,7 +473,7 @@ sub next_chron { # 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 { -- 2.43.2