[hunchentoot-devel] Hard to catch errors below process-request
Hans Hübner
hans.huebner at gmail.com
Fri Jan 21 10:05:00 UTC 2011
Harak, Andrei,
I had a look at the relevant positions in the Hunchentoot source and
would be interested in solving the problem so that errors are
reported, rather than swallowed, without requiring the user to set up
special handlers. My time is limited, though, so if you could help me
by providing an executable test case that exposes the problem, it´d be
greatly appreciated.
Thanks,
Hans
On Fri, Jan 21, 2011 at 10:48 AM, Phil Marneweck <haragx at gmail.com> wrote:
> On Fri, 2011-01-21 at 06:40 +0100, Hans Hübner wrote:
>
> On Fri, Jan 21, 2011 at 4:29 AM, AVS <lispercat at gmail.com> wrote:
>> Thank you for the suggestion, Hans.
>> In the mean time could you try one thing? Put some bad code inside
>> start-output that will cause an exception (for instance (list a b)
>> without a, b defined, or (/ 1 0)). Also (setf *catch-errors-p* nil).
>> If things are as they should be it'll trigger the debugger. In my case
>> it doesn't which is the cause of the whole issue.
>> If it triggers the debugger break for you, it means there is something
>> related to sbcl I am using.
>
> The debugger is not triggered, so the bug is real. Having a way to
> reproduce it by user code would be helpful nevertheless.
>
> -Hans
>
>
> Like following?
>
> (defpackage :test
> (:nicknames :test )
> (:use :cl :hunchentoot :cl-who) )
>
>
> (in-package :test)
>
> ;;(hunchentoot:start (make-instance 'hunchentoot:acceptor :port 1111 ))
>
>
> (hunchentoot::define-easy-handler (eish :uri "/eish.html"
> :default-request-type :both)
> ()
> (cl-who::with-html-output-to-string (*standard-output* nil :indent t)
> (cl-who::str "Hello World XXX")))
>
>
> (defmacro with-debugging (&body body)
> ;; Using this as debugging tool because hunchentoot
> ;; swallows all errors here.
> `(handler-bind ((error #'invoke-debugger))
> , at body))
>
> (defclass xxx ()
> ((ccc)) )
>
>
> (defmethod handle-request :before ((*acceptor* hunchentoot::acceptor)
> (*request* hunchentoot::request))
>
> ; (with-debugging
> (slot-value (make-instance 'xxx) 'xxx)
> ;)
> )
>
> Harag
> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>
More information about the Tbnl-devel
mailing list