[hunchentoot-devel] cgitb

Leslie P. Polzer sky at viridian-project.de
Sat Aug 28 11:29:20 UTC 2010


Ron Garret 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.

Here's what we're using in Weblocks:

  http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/request-handler.lisp#cl-60
  http://bitbucket.org/S11001001/weblocks-dev/src/tip/src/error-handler.lisp#cl-35

 HTH,

   Leslie





More information about the Tbnl-devel mailing list