Commits

Phil Hargett  committed 49e13b0

Added logic to catch errors and render to html-out, rather than cause rendering of an entire page to fail

  • Participants
  • Parent commits 1adbc66

Comments (0)

Files changed (1)

   (render-tag-ready-scripts *current-tag* )
   (render-tag-content *current-tag* ))
 
-(defmethod render-as-html ( (some-expr string))
+(defmethod render-as-html :around (*current-tag*)
+  (handler-case 
+      (call-next-method)
+    (error (e) 
+      (let ((*print-escape* nil))
+	(print (type-of e) *html-out*)
+	(print-object e *html-out*)))))
+
+(defmethod render-as-html ( (some-expr string))  
   (hout "~a" 
 	(with-output-to-string (os)
 	  (with-input-from-string (is some-expr)