Hunchentoot already depends om trivial-backtrace, so it should be pretty trivial to wrap a handler-bind around your code to make it do what you want.
Having said that, we used to have an option to do that automatically (controlled by a special variable) which was removed during The Big Cleanup[TM]. If someone wants to send a patch to add this back in, I'll likely accept that.
Edi.
On Sat, Aug 28, 2010 at 3:50 AM, Ron Garret ron@flownet.com wrote:
Is there any straightforward way to get a backtrace-on-error displayed on the browser screen instead of being logged to a file, like Pythons' cgitb package does? I tried this:
(defun error-handler (arg) [code-to-generate-backtrace])
(setf *HTTP-ERROR-HANDLER* 'error-handler)
but that doesn't work because by the time error-handler is called the server has already exited the error context.
Thanks, rg
tbnl-devel site list tbnl-devel@common-lisp.net http://common-lisp.net/mailman/listinfo/tbnl-devel