From be5b4f85fd11c530a6b914d28c26fb1f95078fd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sat, 25 Apr 2020 22:51:38 +0200 Subject: Add exception handler to description filter. --- module/output/html.scm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/module/output/html.scm b/module/output/html.scm index 20bdd1da..5e09d30f 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -7,6 +7,7 @@ #:use-module (vcomponent group) #:use-module (vcomponent datetime) #:use-module (util) + #:use-module (util exceptions) #:use-module (util config) #:use-module (util tree) #:duplicates (last) @@ -364,7 +365,10 @@ [(start) `(div ,start)])) ,(when (and=> (attr ev 'LOCATION) (negate string-null?)) `(div (b "Plats: ") (div (@ (class "location")),(string-map (lambda (c) (if (char=? c #\,) #\newline c)) (attr ev 'LOCATION))))) - ,(and=> (attr ev 'DESCRIPTION) (lambda (str) ((get-config 'description-filter) ev str))) + ,(and=> (attr ev 'DESCRIPTION) (lambda (str) (catch #t (lambda () ((get-config 'description-filter) ev str)) + (lambda (err args) + (warning "Description filter failed with ~a, ~a" err args) + str)))) ,(awhen (attr ev 'RRULE) `(span (@ (class "rrule")) "Upprepas " -- cgit v1.2.3