diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-04 19:31:41 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-05-04 19:31:41 +0200 |
commit | 13c37a9a7cc0e781a508462d8621e059de73abce (patch) | |
tree | 65ee2a69e34b4516bc6fddac1c4d4a90f62d6209 /module/vcomponent/recurrence/parse.scm | |
parent | "Resolve" missing configuration TODO. (diff) | |
download | calp-13c37a9a7cc0e781a508462d8621e059de73abce.tar.gz calp-13c37a9a7cc0e781a508462d8621e059de73abce.tar.xz |
All warning procedures now uses warning system.
Diffstat (limited to 'module/vcomponent/recurrence/parse.scm')
-rw-r--r-- | module/vcomponent/recurrence/parse.scm | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/module/vcomponent/recurrence/parse.scm b/module/vcomponent/recurrence/parse.scm index 36026899..c72ec367 100644 --- a/module/vcomponent/recurrence/parse.scm +++ b/module/vcomponent/recurrence/parse.scm @@ -9,6 +9,7 @@ #:use-module (srfi srfi-26) #:use-module (vcomponent recurrence internal) #:use-module (util) + #:use-module (util exceptions) #:use-module (ice-9 match)) @@ -52,10 +53,11 @@ ,@(map (match-lambda ((key guard '=> body ...) `((,key) (if (not ,guard) - (begin (warning (quote ,key) - (quote ,guard) - (list ,@guard) - ) + (begin (warning + "RRULE guard failed for key ~a~% guard: ~a : ~s" + ,key ,guard (map (lambda (o) (if (procedure? o) + (procedure-name o) + o)) ,@guard)) ,@else-clause) (begin ,@body)))) ((key body ...) @@ -64,13 +66,6 @@ `(else ,@body))) cases)))) -(define (warning key guard extra) - (display (format #f "Warning RRULE guard failed for key ~a~% guard: ~a : ~s~%" - key guard (map (lambda (o) (if (procedure? o) - (procedure-name o) - o)) extra)) - (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 |