Re: 2 Comments regarding restarts in the CL Condition system
- From: "Kaz Kylheku" <kkylheku@xxxxxxxxx>
- Date: 27 Jan 2007 15:29:06 -0800
On Jan 26, 12:52 am, Madhu <enom...@xxxxxxxx> wrote:
* Barry Margolin <barmar-944140.00530426012...@xxxxxxxxxxxxxxxxxxxxxxxx> :
|> Re (1), it would seem desirable to have the condition object made
|> available to the restart code when invoked. (2) means there is no
|
| Why do you think you need this? What kinds of restarts do you envision
| that need to know why they were invoked?
Condition objects can carry state information (from the point at which
where they were thrown). A restart might need to use such state
information.
Strictly speaking, a restart has nothing to do with conditions. You
can invoke restarts in the absence of any condition handling.
It could just get them from the condition slots if
available. Otherwise INVOKE-RESTART will have to get that information
through some other means (by mutating the dynamic environment, or
prompting the user again)
In an earlier reply, I pointed out that INVOKE-RESTART takes arbitrary
parameters which are passed down to the restart. A handler may use
this to pass the condition object to the restart.
The restart may of course do anything --- including getting rid of the
other conditions on the debug stack, so I'm not sure if this is a
valid notion in general.
A restart gets rid of a condition by performing a dynamic, non-local
control transfer to the point where execution is going to resume. (If
you're using the RESTART-CASE macro, this control transfer takes place
before the given case is entered; the actual restart is over and done
with by that point and the condition is handled).
.
- References:
- 2 Comments regarding restarts in the CL Condition system
- From: Madhu
- Re: 2 Comments regarding restarts in the CL Condition system
- From: Barry Margolin
- Re: 2 Comments regarding restarts in the CL Condition system
- From: Madhu
- 2 Comments regarding restarts in the CL Condition system
- Prev by Date: Re: Integer to Character conversion
- Next by Date: Re: LISP Object Oriented ?
- Previous by thread: Re: 2 Comments regarding restarts in the CL Condition system
- Next by thread: Re: 2 Comments regarding restarts in the CL Condition system
- Index(es):
Relevant Pages
|