[hunchentoot-devel] Question about error handler.

Nicolas Lamirault lam at tuxfamily.org
Mon Feb 26 22:00:36 UTC 2007


Edi Weitz <edi at agharta.de> writes:

> On Mon, 26 Feb 2007 22:41:10 +0100, Nicolas Lamirault <lam at tuxfamily.org> wrote:
>
>> i'm writing a mail which explain my problem, with the backtrace of
>> hunchentoot, and i find my problem !
>
> Yes, that has happened to me a few times as well.  It's always a good
> idea to try to create a bug report or question as detailed as
> possible... :)

yes :)

>> But how the error dispatcher could print the error message to the
>> template ?
>>
>> i could make this :
>>
>>   (package-type-unknown-error (condition)
>>     (hunchentoot:log-message :warn "Clappa system : ~A" condition)
>>     (setf (hunchentoot:session-value 'error-msg)
>>           (clappa-system:package-type condition))
>>     (hunchentoot:redirect "/clappa/error"))
>>
>> and creates a dispatcher "/clappa/error" -> error-dispatcher.
>
> Why don't you just have a handler (instead of a dispatcher) which
> handles the "/clappa/error" URI (and looks at the session value to
> generate a message)?  You could also, BTW, store the condition itself
> in the session.

yes ... i'm trying to implements this ...

thanks for your help and Hunchentoot ...

> _______________________________________________
> tbnl-devel site list
> tbnl-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/tbnl-devel
>

-- 
Nicolas Lamirault



More information about the Tbnl-devel mailing list