guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: saving and restoring the error stack trace


From: Ludovic Courtès
Subject: Re: saving and restoring the error stack trace
Date: Fri, 01 Sep 2006 11:39:45 +0200
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Hi,

Neil Jerram <address@hidden> writes:

>> and that the args content
>> is not explicitly documented (that is, I was not
>> able to find it) even if its content is well defined
>> in 'scm_error_scm()':
>>
>>   scm_ithrow (key,
>>         scm_list_4 (subr, message, args, data), 1);
>
> Yes, here I completely agree with you.  I've been wondering what to do
> about this for ages.  Do you think it can be solved adequately by
> precise documentation, or do we need some way of describing the
> expected throw args in code; perhaps even construct some kind of
> object model around the args with methods for getting the useful bits
> of information out?  (Use of which would be optional.)

Indeed, this exception model is not very convenient.  In some cases,
it's even hardly usable, as examplified by the `test-suite/lib.scm'
hacks (use of regexps to parse exception messages and determine their
meaning...).

Ideally, Guile should use some SRFI-3[56]-like mechanism to represent
exceptions.  Unfortunately, I don't think this could be done without
breaking compatibility.

In any case, documenting the exceptions thrown by the built-in
procedures would certainly help.

Thanks,
Ludovic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]