thoughts on debug error handling of actions

0 views
Skip to first unread message

whalli...@gmail.com

unread,
Jan 16, 2008, 1:34:26 PM1/16/08
to weblocks

I really like seeing the error and backtrace in the browser ala
hunchentoot.

How are y'all handling debugging of actions. Right now i am using
log5[1] and just redirecting all the errors

(defmethod hunchentoot::log-message (log-level fmt &rest args)
(declare (ignore log-level))
(log-for (hunch trace) (apply #'format nil fmt args)))

Think that maybe, for development, instead of popping up dialog
"session has probably timed out" that we put the error message and
maybe the backtrace into the dialog.

[1] http://common-lisp.net/project/log5/

Leslie P. Polzer

unread,
Jan 16, 2008, 2:30:58 PM1/16/08
to weblocks
On Jan 16, 7:34 pm, "whallibur...@gmail.com" <whallibur...@gmail.com>
wrote:
> I really like seeing the error and backtrace in the browser ala
> hunchentoot.

Who does not? Pass :debug t to START-WEBLOCKS. :)


> How are y'all handling debugging of actions. Right now i am using
> log5[1] and just redirecting all the errors

I'm fine with the backtraces for development and logging with log5
later in the production stage.


> Think that maybe, for development, instead of popping up dialog
> "session has probably timed out" that we put the error message and
> maybe the backtrace into the dialog.

After enabling backtraces as above, you can use Firebug to look into
the response of the failed XmlHttpRequest.

HTH

Leslie

Vyacheslav Akhmechet

unread,
Jan 16, 2008, 2:36:39 PM1/16/08
to webl...@googlegroups.com
I agree that looking at backtraces is currently inconvinient in case
of AJAX. Looking in Firebug is a workaround but it isn't very
pleasant. Currently I hit refresh on AJAX error (which usually takes
me to a backtrace), or turn of JS.

I will modify the error handling to provide much better output in case
of errors on AJAX. It's a one more thing I have to get to :)

Regards,
Slava Akhmechet

whalli...@gmail.com

unread,
Jan 17, 2008, 11:48:42 PM1/17/08
to weblocks

function onActionFailure(transport) {
alert(transport.responseText);
}

Not perfect, in that it is full of escapes, but still sped up my
development.



On Jan 16, 2:36 pm, "Vyacheslav Akhmechet" <coffee...@gmail.com>
wrote:

Vyacheslav Akhmechet

unread,
Jan 18, 2008, 12:33:53 AM1/18/08
to webl...@googlegroups.com
On 1/17/08, whalli...@gmail.com <whalli...@gmail.com> wrote:
> function onActionFailure(transport) {
> alert(transport.responseText);
> }
Cool!
Reply all
Reply to author
Forward
0 new messages