diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-25 22:51:38 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-04-25 22:51:38 +0200 |
commit | be5b4f85fd11c530a6b914d28c26fb1f95078fd7 (patch) | |
tree | c99e75aef2cf13caa664165a0b4845efa8364a49 /module/output | |
parent | Add new recurrence generator. (diff) | |
download | calp-be5b4f85fd11c530a6b914d28c26fb1f95078fd7.tar.gz calp-be5b4f85fd11c530a6b914d28c26fb1f95078fd7.tar.xz |
Add exception handler to description filter.
Diffstat (limited to '')
-rw-r--r-- | module/output/html.scm | 6 |
1 files changed, 5 insertions, 1 deletions
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 " |