Method: (SEND-ERROR STREAM T)

Documentation

Ignore trying to read the request or anything. Just send an error message. This is a very low level bailout function.

Source

(defmethod send-error ((stream stream) message)
  "Ignore trying to read the request or anything. Just send an
error message. This is a very low level bailout function."
  (let ((response (make-response stream)))
    (setf (get-header response "Status") "500 Internal Server Error"
          (get-header response "Content-Type") "text/html")
    (with-yaclml-stream (content-stream response)
      (<:html
       (<:head (<:title "500 Internal Server Error"))
       (<:body
        (<:p "Server Error.")
        (<:p (<:as-html message)))))
    (shutdown response)))
Source Context