[Ecls-list] Better handling of printing errors

Matthew Mondor mm_lists at pulsar-zone.net
Sat Jan 19 03:04:15 UTC 2013


On Sat, 19 Jan 2013 02:09:58 +0100
Peter Enerccio <enerccio at gmail.com> wrote:

> Right now, I there is a problem with lisp, the resulting condition is not
> very
> helpful, unless I go into backtrace. In some environments, however, I can't
> do such a thing, so I am left with (if printed readably):
> 
> *Odd number of keys
> 
> *
> Now when I write it's usually new code which is wrong so I find these
> quite easily, but I mean generally, this is not much helpful.
> *
> *
> that is all I get. Is there a better way to print conditions, maybe
> include some localization for the error or something?

Was the code compiled using a debug level of 2 or more?  If I remember
those are necessary for CL-friendly backtraces, and at this debug level
explicit stack frames are inserted to allow that.

Also, I'm not sure if it can help, but at
http://cvs.pulsar-zone.net/cgi-bin/cvsweb.cgi/mmondor/mmsoftware/cl/server/ecl-mp-server.lisp?rev=1.44;content-type=text%2Fplain
the functions LOG-ERROR (and STACKTRACE), as well as the
WITH-LOG-ERRORS macro were useful for me in cases where I wanted errors
to be logged non-interactively with some backtrace (i.e. in
httpd.lisp's worker threads).

I remember that some work was done a while ago for ECL to at least also
show the condition type when printing condition objects, perhaps that
this doesn't occur in all cases though...
-- 
Matt




More information about the ecl-devel mailing list