Re: (warn) isn't doing what I expect it to
- From: Nathan Baum <nathan_baum@xxxxxxxxxxxxxx>
- Date: Mon, 29 Aug 2005 23:13:44 +0100
Nathan Baum wrote:
I'm expecting
(handler-case (warn "foo") (warning (c) (muffle-warning c)))
to produce no output, successfully. Instead it produces
*** - INVOKE-RESTART: No restart named MUFFLE-WARNING is visible.
CLHS says WARN establishes a MUFFLE-WARNING restart. What am I doing wrong?
So HANDLER-CASE unwinds the dynamic environments before executing its forms. Most unexpected. It works if I use HANDLER-BIND.
(handler-bind
((warning #'(lambda (c) (muffle-warning c))))
(warn "foo"))I think that's a bit ugly, though. Is there a common idiom for what I want to do, or should I go ahead and roll my own macro?
.
- Follow-Ups:
- Re: (warn) isn't doing what I expect it to
- From: Kent M Pitman
- Re: (warn) isn't doing what I expect it to
- From: Wade Humeniuk
- Re: (warn) isn't doing what I expect it to
- From: Edi Weitz
- Re: (warn) isn't doing what I expect it to
- References:
- (warn) isn't doing what I expect it to
- From: Nathan Baum
- (warn) isn't doing what I expect it to
- Prev by Date: Re: (warn) isn't doing what I expect it to
- Next by Date: Re: (warn) isn't doing what I expect it to
- Previous by thread: Re: (warn) isn't doing what I expect it to
- Next by thread: Re: (warn) isn't doing what I expect it to
- Index(es):
Relevant Pages
|
|