aboutsummaryrefslogtreecommitdiff
path: root/module/vcomponent
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@lysator.liu.se>2020-04-17 22:07:48 +0200
committerHugo Hörnquist <hugo@lysator.liu.se>2020-04-17 22:07:48 +0200
commit59728f72bd905ddc0e7ddc3e4fb1cb5fa1d48a2c (patch)
treeffd4ec21b9378381ec0e7d489f0f9dbc237f1437 /module/vcomponent
parentRRULE parser now converts weekdays to (datetime util) weekdays. (diff)
downloadcalp-59728f72bd905ddc0e7ddc3e4fb1cb5fa1d48a2c.tar.gz
calp-59728f72bd905ddc0e7ddc3e4fb1cb5fa1d48a2c.tar.xz
Improve some errors.
Diffstat (limited to 'module/vcomponent')
-rw-r--r--module/vcomponent/recurrence/parse.scm9
1 files changed, 8 insertions, 1 deletions
diff --git a/module/vcomponent/recurrence/parse.scm b/module/vcomponent/recurrence/parse.scm
index 66605c11..a2221660 100644
--- a/module/vcomponent/recurrence/parse.scm
+++ b/module/vcomponent/recurrence/parse.scm
@@ -52,7 +52,9 @@
,@(map (match-lambda
((key guard '=> body ...)
`((,key) (if (not ,guard)
- (begin ,@else-clause)
+ (begin (warning (quote ,key)
+ (quote ,guard))
+ ,@else-clause)
(begin ,@body))))
((key body ...)
`((,key) (begin ,@body)))
@@ -60,6 +62,11 @@
`(else ,@body)))
cases))))
+(define (warning key guard )
+ (display (format #f "Warning RRULE guard failed for key ~a~% guard: ~a~%"
+ key guard)
+ (current-error-port)))
+
;; RFC 5545, Section 3.3.10. Recurrence Rule, states that the UNTIL value MUST have
;; the same type as the DTSTART of the event (date or datetime). I have seen events
;; in the wild which didn't follow this. I consider that an user error.