From 1da5a277188a954d881316cb605962ee66053285 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 17 Mar 2022 22:14:18 +0100 Subject: Normalize errors. --- module/vcomponent/recurrence/parse.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'module/vcomponent/recurrence/parse.scm') diff --git a/module/vcomponent/recurrence/parse.scm b/module/vcomponent/recurrence/parse.scm index c2e3a10f..65d44331 100644 --- a/module/vcomponent/recurrence/parse.scm +++ b/module/vcomponent/recurrence/parse.scm @@ -51,7 +51,9 @@ (define-macro (quick-case key . cases) (let ((else-clause (or (assoc-ref cases 'else) - '(error "Guard failed")))) + '(scm-error 'misc-error "quick-case" + "Guard failed" + #f #f)))) `(case ,key ,@(map (match-lambda ((key guard '=> body ...) @@ -74,10 +76,10 @@ (define* (string->number/throw string optional: (radix 10)) (or (string->number string radix) - (scm-error 'wrong-type-argument + (scm-error 'wrong-type-arg "string->number/throw" "Can't parse ~s as number in base ~a" - '(string radix) #f))) + (list string radix) (list string radix)))) ;; 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 -- cgit v1.2.3