| Paste number 81046: | debuggable-acceptor |
| Pasted by: | younder |
| When: | 1 year, 3 months ago |
| Share: | Tweet this! | http://paste.lisp.org/+1QJA |
| Channel: | None |
| Paste contents: |
;;; Courtesy of Andreas Fucks
;;; An acceptor that invokes the debugger on errors:
(defclass debuggable-acceptor (hunchentoot:acceptor)
())
(defmethod process-connection ((*acceptor* debuggable-acceptor) (socket t))
(declare (ignore socket))
(handler-bind ((error #'invoke-debugger))
(call-next-method)))
(defmethod acceptor-request-dispatcher ((*acceptor* debuggable-acceptor))
(let ((dispatcher (call-next-method)))
(lambda (request)
(handler-bind ((error #'invoke-debugger))
(funcall dispatcher request)))))
This paste has no annotations.