guile-devel
[Top][All Lists]
Advanced

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

Re: Backtrace and enhanced catch


From: Neil Jerram
Subject: Re: Backtrace and enhanced catch
Date: Sat, 21 Jan 2006 11:26:02 +0000
User-agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux)

address@hidden (Ludovic Courtès) writes:

> Yes, but internally, there is necessarily some form of `lazy-catch',

Not exactly, no.

> i.e., there is code that executes just after the exception was raised
> and just before the stack is unwound.

Yes, there is such code, but this is just part of what `lazy-catch' as
a whole needs to do.

>  So it seems that `catch' is just hiding this away.

`Hiding' is a loaded word.  I would agree that `catch' is
encapsulating the running of this code.  The whole point of my
analysis is that this is a good thing.

>> (BTW, in connection with `guard', which was called `try' in the
>> original draft of SRFI 34, I came across this email in the discussion
>> archive: http://srfi.schemers.org/srfi-34/mail-archive/msg00013.html.
>> This email concludes:
>>
>>     Robust and portable code should only use the "try" form.
>>
>> for reasons connected to how dynamic state is handled that I think are
>> similar to the reasoning in my analysis.
>>
>> If accepted, this conclusion leaves SRFI-34 incomplete, because
>> try/guard provides no way of running something in the context of the
>> original error.)
>
> Well, you still have `with-exception-handler', except that it must be
> used carefully.

When I wrote "If accepted", I meant "If you agree that `robust and
portable code should only use the try form'", which implies that
with-exception-handler should not be used.

Thanks for your comments on this!

Regards,
        Neil





reply via email to

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