From 3459bff7dff8e267e8ab7b8dd6e4535d45d4b80c Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Fri, 1 Dec 2006 23:32:55 +1300 Subject: [PATCH] We don't need to loop 100 times to see there is a problem. And when we do we should describe it better as well. --- dba/caldav_functions.sql | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dba/caldav_functions.sql b/dba/caldav_functions.sql index 61babf54..481e6918 100644 --- a/dba/caldav_functions.sql +++ b/dba/caldav_functions.sql @@ -179,7 +179,7 @@ BEGIN END IF; - loopcount := 1000; -- Not really needed, but stops an infinite loop if there is a bug! + loopcount := 100; -- Desirable to stop an infinite loop if there is something we cannot handle LOOP -- RAISE NOTICE ''Testing date: %'', our_answer; IF frequency = ''WEEKLY'' THEN @@ -206,7 +206,7 @@ BEGIN loopcount := loopcount - 1; IF loopcount < 0 THEN - RAISE EXCEPTION ''Could not cope with dates after % using % from %'', earliest, repeatrule, basedate; + RAISE EXCEPTION ''Giving up on repeat rule "%" - after 100 increments from % we are still not after %'', repeatrule, basedate, earliest; RETURN NULL; END IF;