diff options
author | 2008-03-11 23:43:20 +0100 | |
---|---|---|
committer | 2008-03-11 23:43:20 +0100 | |
commit | 4ebd68686897356b813dd73553b16cabe3ddad95 (patch) | |
tree | 3b919fa5fae4256e016291d1469294c31293d00d | |
parent | f1ef3f80cf69cbfdeaf4f5a532ec7fa4da1f772d (diff) | |
download | tekuti-4ebd68686897356b813dd73553b16cabe3ddad95.tar.gz tekuti-4ebd68686897356b813dd73553b16cabe3ddad95.zip |
don't say I'm not lenient
* tekuti/post.scm (post-sxml-content): Don't throw an exception if a post
fails to format.
-rw-r--r-- | tekuti/post.scm | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/tekuti/post.scm b/tekuti/post.scm index e295c9d..2b96c3f 100644 --- a/tekuti/post.scm +++ b/tekuti/post.scm @@ -105,11 +105,16 @@ (git "show" (string-append (assq-ref post 'sha1) ":content"))) (define (post-sxml-content post) - (let ((format (or (assq-ref post 'format) 'wordpress))) - ((case format - ((wordpress) wordpress->sxml) - (else (lambda (text) `(pre ,text)))) - (post-raw-content post)))) + (let ((format (or (assq-ref post 'format) 'wordpress)) + (raw (post-raw-content post))) + (catch #t + (lambda () + (with-backtrace + (case format + ((wordpress) (wordpress->sxml raw)) + (else `(pre ,raw))))) + (lambda args + `(pre "Formatting error\n" ,raw))))) (define (post-readable-date post) (let ((date (time-utc->date |