Hi everbody,
I'm a Lisp newbie but I need to get my system up and running fast. I'm building a system that might cause multiple Hunchentoot servers to use conflicting ports. I want to handle this with an error handler and I've setup a wrapper function to start Hunchentoot and a restart function:
;; restart function to handle conflicting ports (defun ht-port-conflict-handler (condition) (... do something here to address the conflicting ports ...) (invoke-restart 'ht-port-conflict-handler))
;; Start Hunchentoot Server with error-handling (defun ht-start-with-error-handler () (handler-bind ((simple-error #'ht-port-conflict-handler)) (restart-case (setf *ht-handle* (hunchentoot:start-server :port *ht-port*)) (ht-port-conflict-handler () nil))))
The system should allow users to reconfigure their instance of Hunchentoot without having to invoke the debugger, but when I run this code I always end up in the debugger anyway. Can anybody tell me where I went wrong? Or maybe there's a better solution for my situation?
Regards, Raditya Kertiyasa